From: [EMAIL PROTECTED]
Operating system: NetWare, most likely Win32
PHP version: 5.2CVS-2008-11-01 (snap)
PHP Bug Type: Gettext related
Bug description: recent macro introduction breaks compile with CodeWarrior
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 bug report at http://bugs.php.net/?id=46460&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46460&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46460&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46460&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46460&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46460&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46460&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46460&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46460&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46460&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46460&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46460&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46460&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46460&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46460&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46460&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46460&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46460&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46460&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46460&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46460&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46460&r=mysqlcfg