[PHP-CVS] 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

2010-06-02 Thread Rasmus Lerdorf
rasmus   Wed, 02 Jun 2010 19:26:10 +

Revision: http://svn.php.net/viewvc?view=revision&revision=300105

Log:
vim fail

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:24:36 UTC 
(rev 300104)
+++ php/php-src/branches/PHP_5_2/ext/standard/string.c  2010-06-02 19:26:10 UTC 
(rev 300105)
@@ -40,9 +40,9 @@
 /*
  * 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
+ * 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

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:24:36 UTC 
(rev 300104)
+++ php/php-src/branches/PHP_5_3/ext/standard/string.c  2010-06-02 19:26:10 UTC 
(rev 300105)
@@ -39,9 +39,9 @@
 /*
  * 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
+ * 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

Modified: php/php-src/trunk/ext/standard/string.c
===
--- php/php-src/trunk/ext/standard/string.c 2010-06-02 19:24:36 UTC (rev 
300104)
+++ php/php-src/trunk/ext/standard/string.c 2010-06-02 19:26:10 UTC (rev 
300105)
@@ -39,9 +39,9 @@
 /*
  * 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
+ * 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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] 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

2010-06-02 Thread Rasmus Lerdorf
rasmus   Wed, 02 Jun 2010 19:24:36 +

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 
 #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  /* 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 
 #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  /* 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 
 #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  /* 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 */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] 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

2010-06-01 Thread Rasmus Lerdorf
rasmus   Wed, 02 Jun 2010 05:53:13 +

Revision: http://svn.php.net/viewvc?view=revision&revision=300085

Log:
Fix for bug #51847
Someone in libintl world decided it was a good idea to do:

#undef setlocale
#define setlocale libintl_setlocale

That means, of course, that any use of "setlocale" by the
preprocessor now becomes libintl_setlocale which means we
no longer have a _zif_setlocale symbol in string.o, but we
magically have a _zif_libintl_setlocale symbol.  The linker
is obviously not very happy about this when basic_functions.o
tries to find _zif_setlocale.

So, let's not do that again.

Bug: http://bugs.php.net/51847 (Open) php 5.2.13 and gettext 0.18: Undefined 
symbols: _zif_setlocale
  
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 03:51:46 UTC 
(rev 300084)
+++ php/php-src/branches/PHP_5_2/ext/standard/string.c  2010-06-02 05:53:13 UTC 
(rev 300085)
@@ -39,6 +39,9 @@
 #endif
 #ifdef HAVE_LIBINTL
 # include  /* For LC_MESSAGES */
+ #ifdef setlocale
+ # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ #endif
 #endif

 #include 

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 03:51:46 UTC 
(rev 300084)
+++ php/php-src/branches/PHP_5_3/ext/standard/string.c  2010-06-02 05:53:13 UTC 
(rev 300085)
@@ -38,6 +38,9 @@
 #endif
 #ifdef HAVE_LIBINTL
 # include  /* For LC_MESSAGES */
+ #ifdef setlocale
+ # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ #endif
 #endif

 #include "scanf.h"

Modified: php/php-src/trunk/ext/standard/string.c
===
--- php/php-src/trunk/ext/standard/string.c 2010-06-02 03:51:46 UTC (rev 
300084)
+++ php/php-src/trunk/ext/standard/string.c 2010-06-02 05:53:13 UTC (rev 
300085)
@@ -38,6 +38,9 @@
 #endif
 #ifdef HAVE_LIBINTL
 # include  /* For LC_MESSAGES */
+ #ifdef setlocale
+ # undef setlocale /* Uh, libintl, don't F* our symbols please */
+ #endif
 #endif

 #include "scanf.h"

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php