svn: /php/php-src/ branches/PHP_5_2/ext/standard/string.c branches/PHP_5_3/ext/standard/string.c trunk/ext/standard/string.c
| From: | Rasmus Lerdorf | Date: | Wed, 02 Jun 2010 19:24:36 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/ext/standard/string.c branches/PHP_5_3/ext/standard/string.c trunk/ext/standard/string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62800@lists.php.net to get a copy of this message | ||
rasmus Wed, 02 Jun 2010 19:24:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300104
Log:
Tweak the fix for bug #51847 to still call libintl_setlocale
when libintl has done that redefine.
Bug: http://bugs.php.net/51847 (error getting bug
information)
Changed paths:
U php/php-src/branches/PHP_5_2/ext/standard/string.c
U php/php-src/branches/PHP_5_3/ext/standard/string.c
U php/php-src/trunk/ext/standard/string.c
Modified: php/php-src/branches/PHP_5_2/ext/standard/string.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/string.c 2010-06-02 19:22:47 UTC (rev 300103)
+++ php/php-src/branches/PHP_5_2/ext/standard/string.c 2010-06-02 19:24:36 UTC (rev 300104)
@@ -37,10 +37,18 @@
#ifdef HAVE_MONETARY_H
# include <monetary.h>
#endif
+/*
+ * This define is here because some versions of libintl redefine setlocale
+ * to point to libintl_setlocale. That's a ridiculous thing to do as far
+ * as * I am concerned, but with this define and the subsequent undef we
+ * limit * the damage to just the actual setlocale() call in this file
+ * without * turning zif_setlocale into zif_libintl_setlocale. -Rasmus
+ */
+#define php_my_setlocale setlocale
#ifdef HAVE_LIBINTL
# include <libintl.h> /* For LC_MESSAGES */
#ifdef setlocale
- # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ # undef setlocale
#endif
#endif
@@ -4176,7 +4184,7 @@
}
}
- retval = setlocale (cat, loc);
+ retval = php_my_setlocale (cat, loc);
zend_update_current_locale();
if (retval) {
/* Remember if locale was changed */
Modified: php/php-src/branches/PHP_5_3/ext/standard/string.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/string.c 2010-06-02 19:22:47 UTC (rev 300103)
+++ php/php-src/branches/PHP_5_3/ext/standard/string.c 2010-06-02 19:24:36 UTC (rev 300104)
@@ -36,10 +36,18 @@
#ifdef HAVE_MONETARY_H
# include <monetary.h>
#endif
+/*
+ * This define is here because some versions of libintl redefine setlocale
+ * to point to libintl_setlocale. That's a ridiculous thing to do as far
+ * as * I am concerned, but with this define and the subsequent undef we
+ * limit * the damage to just the actual setlocale() call in this file
+ * without * turning zif_setlocale into zif_libintl_setlocale. -Rasmus
+ */
+#define php_my_setlocale setlocale
#ifdef HAVE_LIBINTL
# include <libintl.h> /* For LC_MESSAGES */
#ifdef setlocale
- # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ # undef setlocale
#endif
#endif
@@ -4095,7 +4103,7 @@
}
}
- retval = setlocale(cat, loc);
+ retval = php_my_setlocale(cat, loc);
zend_update_current_locale();
if (retval) {
/* Remember if locale was changed */
Modified: php/php-src/trunk/ext/standard/string.c
===================================================================
--- php/php-src/trunk/ext/standard/string.c 2010-06-02 19:22:47 UTC (rev 300103)
+++ php/php-src/trunk/ext/standard/string.c 2010-06-02 19:24:36 UTC (rev 300104)
@@ -36,10 +36,18 @@
#ifdef HAVE_MONETARY_H
# include <monetary.h>
#endif
+/*
+ * This define is here because some versions of libintl redefine setlocale
+ * to point to libintl_setlocale. That's a ridiculous thing to do as far
+ * as * I am concerned, but with this define and the subsequent undef we
+ * limit * the damage to just the actual setlocale() call in this file
+ * without * turning zif_setlocale into zif_libintl_setlocale. -Rasmus
+ */
+#define php_my_setlocale setlocale
#ifdef HAVE_LIBINTL
# include <libintl.h> /* For LC_MESSAGES */
#ifdef setlocale
- # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ # undef setlocale
#endif
#endif
@@ -4095,7 +4103,7 @@
}
}
- retval = setlocale(cat, loc);
+ retval = php_my_setlocale(cat, loc);
zend_update_current_locale();
if (retval) {
/* Remember if locale was changed */