Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

PHP mysqlnd svn commit: r841 - trunk/mysqlnd

From: <ahristov(at)mysql.com>
Date: Wed Jul 25 2007 - 08:41:32 EDT


Author: ahristov
Date: 2007-07-25 14:41:31 +0200 (Wed, 25 Jul 2007) New Revision: 841

Modified:

   trunk/mysqlnd/mysqlnd_wireprotocol.c
   trunk/mysqlnd/portability.h
Log:
Alignment fixes

Modified: trunk/mysqlnd/mysqlnd_wireprotocol.c


  • trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-07-25 11:50:23 UTC (rev 840) +++ trunk/mysqlnd/mysqlnd_wireprotocol.c 2007-07-25 12:41:31 UTC (rev 841) @@ -268,7 +268,8 @@ */ size_t mysqlnd_stream_write_w_header(MYSQLND * const conn, char * const buf, size_t count TSRMLS_DC) { - zend_uchar safe_storage[MYSQLND_HEADER_SIZE];
    + zend_uchar safe_buf[((MYSQLND_HEADER_SIZE) + (sizeof(zend_uchar)) - 1) / (sizeof(zend_uchar))];
    + zend_uchar *safe_storage = (char *) &safe_buf;
    MYSQLND_NET *net = &conn->net; size_t old_chunk_size = net->stream->chunk_size; size_t ret, left = count, packets_sent = 1; @@ -315,7 +316,8 @@ size_t mysqlnd_stream_write_w_command(MYSQLND * const conn, enum php_mysqlnd_server_command command, const char * const buf, size_t count TSRMLS_DC) { - zend_uchar safe_storage[MYSQLND_HEADER_SIZE + 1];
    + zend_uchar safe_buf[((MYSQLND_HEADER_SIZE) + (sizeof(zend_uchar)) - 1) / (sizeof(zend_uchar))];
    + zend_uchar *safe_storage = (char *) &safe_buf;
    MYSQLND_NET *net = &conn->net; size_t old_chunk_size = net->stream->chunk_size; size_t ret, left = count, header_len = MYSQLND_HEADER_SIZE + 1, packets_sent = 1;

Modified: trunk/mysqlnd/portability.h


  • trunk/mysqlnd/portability.h 2007-07-25 11:50:23 UTC (rev 840) +++ trunk/mysqlnd/portability.h 2007-07-25 12:41:31 UTC (rev 841) @@ -102,19 +102,19 @@

 #elif SIZEOF_INT == 4  

-#ifndef (SIZEOF_INT32 == 0)
+#if (SIZEOF_INT32 == 0)
 typedef signed int int32;

 #endif
-#ifndef (SIZEOF_UINT32 == 0)
+#if (SIZEOF_UINT32 == 0)

 typedef unsigned int uint32;
 #endif  

 #elif SIZEOF_LONG == 4  

Do you need help?X

-#ifndef (SIZEOF_INT32 == 0)
+#if (SIZEOF_INT32 == 0)
 typedef signed long int32;

 #endif
-#ifndef (SIZEOF_UINT32 == 0)
+#if (SIZEOF_UINT32 == 0)

 typedef unsigned long uint32;
 #endif  
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Wed Jul 25 08:41:36 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:13:55 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library