ID: 46460
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Assigned
Bug Type: Gettext related
Operating System: NetWare, most likely Win32
PHP Version: 5.2CVS-2008-11-01 (snap)
-Assigned To:
+Assigned To: jani
New Comment:
Something simple was made into something overly complex..I'm testing
a fix now.
Previous Comments:
------------------------------------------------------------------------
[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