ID:               46460
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Assigned
+Status:           Closed
 Bug Type:         Gettext related
 Operating System: NetWare, most likely Win32
 PHP Version:      5.2CVS-2008-11-01 (snap)
 Assigned To:      jani
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-11-01 23:01:31] [EMAIL PROTECTED]

Something simple was made into something overly complex..I'm testing 
a fix now.

------------------------------------------------------------------------

[2008-11-01 22:23:21] [EMAIL PROTECTED]

Description:
------------
The recent changes to gettext.c break NetWare with CodeWarrior.
The culprit are the macro defines which in turn when used declare vars
int check_len and char *check_name in the middle of the code.
This is illegal for many non-gcc compilers, and from my experience I
assume this will also break Win32/MSVC most likely beside
NetWare/CodeWarrior.
As workaround the vars can be declared global;
although I'm not fine with this - but it works:

--- gettext.c.orig      Thu Oct 30 16:38:02 2008
+++ gettext.c   Sat Nov 01 23:19:08 2008
@@ -144,6 +144,9 @@
 ZEND_GET_MODULE(php_gettext)
 #endif
 
+static int check_len;
+static char *check_name;
+
 #define PHP_GETTEXT_MAX_DOMAIN_LENGTH 1024
 #define PHP_GETTEXT_MAX_MSGID_LENGTH 4096
 
@@ -154,8 +157,8 @@
        }
 
 #define PHP_GETTEXT_MSGID_LENGTH_CHECK \
-       char *check_name = "msgid"; \
-       int check_len   = msgid_len; \
+       check_name = "msgid"; \
+       check_len  = msgid_len; \
        PHP_GETTEXT_LENGTH_CHECK
 
 #define PHP_GETTEXT_LENGTH_CHECK \
@@ -165,8 +168,6 @@
        }
 
 #define PHP_GETTEXT_MULTI_MSGID_LENGTH_CHECK \
-       int check_len; \
-       char *check_name; \
        check_name = "msgid1"; \
        check_len = msgid1_len; \
        PHP_GETTEXT_LENGTH_CHECK \




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46460&edit=1

Reply via email to