diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2010-06-02 19:24:36 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2010-06-02 19:24:36 +0000 |
| commit | 2c342f16c1d5f0247ef389dd68c4801d0b7e9467 (patch) | |
| tree | 166c953ae981d80d725fa677772d91358fcdd32b | |
| parent | 2fd5a6a188932312857a0dc57b994e2366bbca35 (diff) | |
| download | php-git-2c342f16c1d5f0247ef389dd68c4801d0b7e9467.tar.gz | |
Tweak the fix for bug #51847 to still call libintl_setlocale
when libintl has done that redefine.
| -rw-r--r-- | ext/standard/string.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index e342b56527..41855f1f8d 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -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 @@ PHP_FUNCTION(setlocale) } } - retval = setlocale(cat, loc); + retval = php_my_setlocale(cat, loc); zend_update_current_locale(); if (retval) { /* Remember if locale was changed */ |
