File php5-alignment.patch of Package php5

--- Zend/zend_alloc.c
+++ Zend/zend_alloc.c
@@ -601,7 +601,8 @@ static unsigned int _zend_mm_cookie = 0;
 #if SUHOSIN_PATCH
 
 # define SUHOSIN_MM_CHECK_CANARIES(block, MFUNCTION) do { \
-        size_t *p = SUHOSIN_MM_END_CANARY_PTR(block), check; \
+        void *p = SUHOSIN_MM_END_CANARY_PTR(block); \
+	size_t check; \
 		if (((block)->info.canary_1 != heap->canary_1) || ((block)->info.canary_2 != heap->canary_2)) { \
 			canary_mismatch: \
             zend_suhosin_log(S_MEMORY, "canary mismatch on " MFUNCTION " - heap overflow detected"); \
@@ -621,10 +622,10 @@ static unsigned int _zend_mm_cookie = 0;
     } while (0)      
 
 # define SUHOSIN_MM_END_CANARY_PTR(block) \
-	(size_t*)(((char*)(ZEND_MM_DATA_OF(block))) + ((zend_mm_block*)(block))->info.size + END_MAGIC_SIZE)
+	(void *)(((char*)(ZEND_MM_DATA_OF(block))) + ((zend_mm_block*)(block))->info.size + END_MAGIC_SIZE)
 
 # define SUHOSIN_MM_SET_END_CANARY(block) do { \
-		size_t *p = SUHOSIN_MM_END_CANARY_PTR(block); \
+		void *p = SUHOSIN_MM_END_CANARY_PTR(block); \
 		memcpy(p, &heap->canary_3, CANARY_SIZE); \
 	} while (0)
 
--- ext/hash/php_hash_tiger.h
+++ ext/hash/php_hash_tiger.h
@@ -25,9 +25,9 @@
 typedef struct {
 	php_hash_uint64 state[3];
 	php_hash_uint64 passed;
+	unsigned char buffer[64];
 	unsigned char passes:1;
 	unsigned char length:7;
-	unsigned char buffer[64];
 } PHP_TIGER_CTX;
 
 PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context);
--- ext/mbstring/oniguruma/regint.h
+++ ext/mbstring/oniguruma/regint.h
@@ -256,7 +256,7 @@
 #define NULL_UCHARP                   ((UChar* )0)
 
 #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
-#define WORD_ALIGNMENT_SIZE       SIZEOF_INT
+#define WORD_ALIGNMENT_SIZE       SIZEOF_LONG
 
 #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
   (pad_size) = WORD_ALIGNMENT_SIZE \
--- ext/sysvshm/sysvshm.c
+++ ext/sysvshm/sysvshm.c
@@ -375,7 +375,7 @@ static int php_put_shm_data(sysvshm_chun
 	long total_size;
 	long shm_varpos;
 
-	total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / 4) * 4 + 4; /* 4-byte alligment */
+	total_size = ((long) (len + sizeof(sysvshm_chunk) - 1) / sizeof(long)) * sizeof(long) + sizeof(long); /* long alligment */
 
 	if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) {
 		php_remove_shm_data(ptr, shm_varpos);