Hallo Marcus,
Marcus Boerger wrote:
> Hello Andrey,
> 
>   basically you cannot use any define. And when you want to be platform
> agnostic/independent then you must assume all posix/c-api functions are
> defines.

I already suspected this when I wrote the code but gcc had no probs with
it. The windows error came as surprise to me, but anyway lesson learnt.

> marcus
> 
> Tuesday, October 23, 2007, 12:10:18 PM, you wrote:
> 
>> andrey          Tue Oct 23 10:10:18 2007 UTC
> 
>>   Modified files:              (Branch: PHP_5_3)
>>     /php-src/ext/mysqlnd        mysqlnd.c mysqlnd_debug.h 
>>   Log:
>>   Fix build failure on Windows. Seems "free" can't be used even as method
>> name of a structure. The MS compiler (the
>> preprocessor most probably) changes it to _free_dbg
>>   
>> http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.2&r2=1.5.2.3&diff_format=u
>> Index: php-src/ext/mysqlnd/mysqlnd.c
>> diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2
>> php-src/ext/mysqlnd/mysqlnd.c:1.5.2.3
>> --- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.2       Fri Oct  5 21:23:56 2007
>> +++ php-src/ext/mysqlnd/mysqlnd.c       Tue Oct 23 10:10:18 2007
>> @@ -18,7 +18,7 @@
>>    +----------------------------------------------------------------------+
>>  */
>>  
>> -/* $Id: mysqlnd.c,v 1.5.2.2 2007/10/05 21:23:56 andrey Exp $ */
>> +/* $Id: mysqlnd.c,v 1.5.2.3 2007/10/23 10:10:18 andrey Exp $ */
>>  #include "php.h"
>>  #include "mysqlnd.h"
>>  #include "mysqlnd_wireprotocol.h"
>> @@ -2032,7 +2032,7 @@
>>         DBG_ENTER("RSHUTDOWN");
>>         if (dbg) {
>>                 dbg->m->close(dbg);
>> -               dbg->m->free(dbg);
>> +               dbg->m->free_handle(dbg);
>>                 MYSQLND_G(dbg) = NULL;
>>         }
>>  #endif
>> http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.h?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
>> Index: php-src/ext/mysqlnd/mysqlnd_debug.h
>> diff -u php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2
>> php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.3
>> --- php-src/ext/mysqlnd/mysqlnd_debug.h:1.1.2.2 Fri Oct  5 21:23:56 2007
>> +++ php-src/ext/mysqlnd/mysqlnd_debug.h Tue Oct 23 10:10:18 2007
>> @@ -18,7 +18,7 @@
>>    +----------------------------------------------------------------------+
>>  */
>>  
>> -/* $Id: mysqlnd_debug.h,v 1.1.2.2 2007/10/05 21:23:56 andrey Exp $ */
>> +/* $Id: mysqlnd_debug.h,v 1.1.2.3 2007/10/23 10:10:18 andrey Exp $ */
>>  
>>  #ifndef MYSQLND_DEBUG_H
>>  #define MYSQLND_DEBUG_H
>> @@ -39,7 +39,7 @@
>>                                                         char * func_name, 
>> uint func_name_len);
>>         enum_func_status (*func_leave)(MYSQLND_DEBUG *self, unsigned int 
>> line, const char * const file);
>>         enum_func_status (*close)(MYSQLND_DEBUG *self);
>> -       enum_func_status (*free)(MYSQLND_DEBUG *self);
>> +       enum_func_status (*free_handle)(MYSQLND_DEBUG *self);
>>  };
>>  
>>  struct st_mysqlnd_debug
> 
> 
> 
> 
> Best regards,
>  Marcus
> 

Grüße,
Andrey

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to