This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] libstdc++/32509


Hi,

this is the patch I mean to apply to mainline and 4_2-branch to resolve the issue without regressing on 31717: essentially we are back to the behavior pre-31717 + the minimal AC_EGREP_CPP sanity check always carried out (either when the gnu locale model is explicitely configured or tried on auto).

Tested x86-linux, auto, generic, gnu.

Paolo.

///////////////////
2007-06-28  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/32509
	* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks
	involving the de_DE locale only if an auto locale config is
	used for a target suitable for the gnu locale model.
	* docs/html/install.html: Update.
	* configure: Regenerated.
Index: docs/html/install.html
===================================================================
--- docs/html/install.html	(revision 126075)
+++ docs/html/install.html	(working copy)
@@ -80,9 +80,10 @@
       information must be installed.
 
       <p>
-      Note that those sanity checks are also perfomed when an explicit
-      --enable-clocale=gnu configure option is used:  this behavior is
-      new in gcc 4.2.1 and defends against misconfigurations.
+      Note however that the sanity checks involving the de_DE locale are
+      skipped when an explicit --enable-clocale=gnu configure option is
+      used: only the basic checks are carried out, defending against
+      misconfigurations.
       </p>
 
       <p>
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 126075)
+++ acinclude.m4	(working copy)
@@ -1341,21 +1341,22 @@
     #endif
     ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
 
-    # Test for bugs early in glibc-2.2.x series
-    AC_TRY_RUN([
-    #define _GNU_SOURCE 1
-    #include <locale.h>
-    #include <string.h>
-    #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-    extern __typeof(newlocale) __newlocale;
-    extern __typeof(duplocale) __duplocale;
-    extern __typeof(strcoll_l) __strcoll_l;
-    #endif
-    int main()
-    {
-        const char __one[] = "Äuglein Augmen";
+    if test $enable_clocale = auto; then
+      # Test for bugs early in glibc-2.2.x series
+      AC_TRY_RUN([
+      #define _GNU_SOURCE 1
+      #include <locale.h>
+      #include <string.h>
+      #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+      extern __typeof(newlocale) __newlocale;
+      extern __typeof(duplocale) __duplocale;
+      extern __typeof(strcoll_l) __strcoll_l;
+      #endif
+      int main()
+      {
+	const char __one[] = "Äuglein Augmen";
         const char __two[] = "Äuglein";
-        int i;
+       	int i;
         int j;
         __locale_t        loc;
         __locale_t        loc_dup;
@@ -1364,10 +1365,11 @@
         i = __strcoll_l(__one, __two, loc);
         j = __strcoll_l(__one, __two, loc_dup);
         return 0;
-    }
-    ],
-    [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
-    [enable_clocale_flag=generic])
+      }
+      ],
+      [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+      [enable_clocale_flag=generic])
+    fi
 
     # Set it to scream when it hurts.
     ac_save_CFLAGS="$CFLAGS"	

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]