php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #79356
Patch FFI_structure_union_alignment_s390x revision 2020-03-09 05:53 UTC by vibhutisawant18 at gmail dot com

Patch FFI_structure_union_alignment_s390x for Testing related Bug #79356

Patch version 2020-03-09 05:53 UTC

Return to Bug #79356 | Download this patch
Patch Revisions:

Developer: vibhutisawant18@gmail.com

diff --git a/ext/ffi/tests/022.phpt b/ext/ffi/tests/022.phpt
index 9e5bb91..9c30ca1 100644
--- a/ext/ffi/tests/022.phpt
+++ b/ext/ffi/tests/022.phpt
@@ -61,8 +61,16 @@ test_size(32, "struct {char a; uint32_t b __attribute__((aligned(16)));}");
 test_align(16, "struct {char a; uint32_t b __attribute__((aligned(16)));}");

 if (substr(PHP_OS, 0, 3) != 'WIN') {
+    if(PHP_uname('m') == 's390x')
+    {
+    test_size(16, "struct  {char a; uint32_t b __attribute__((aligned));}");
+    test_align(8, "struct  {char a; uint32_t b __attribute__((aligned));}");
+    }
+    else
+    {
     test_size(32, "struct  {char a; uint32_t b __attribute__((aligned));}");
     test_align(16, "struct  {char a; uint32_t b __attribute__((aligned));}");
+    }
 }

 test_size(16, "struct  __declspec(align(16)) {char a; uint32_t b;}");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC