bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU awk 3.1.1 fails where 3.0.4 succeeds


From: Aharon Robbins
Subject: Re: GNU awk 3.1.1 fails where 3.0.4 succeeds
Date: Thu, 6 Feb 2003 16:41:26 +0200

Greetings.  Re this:

> Date: Thu, 06 Feb 2003 07:58:38 -0600
> From: olivier clarisse <address@hidden>
> To: address@hidden
> Subject: GNU awk 3.1.1 fails where 3.0.4 succeeds
>
> Attached is a brief test and results characterizing
> a failure to build gtk+1.2 on systems where awk 3.1.1
> has been installed while the same test succeeds where
> GNU awk 3.0.4 is installed instead.
>
> See README in attachement for details.
> Note that this test has really nothing specific
> left about gtk+1.2 at this point, just that this
> is where the problem was found.
>
> Regards,
>
> -- 
> Olivier
> http://well2u.com

The "problem" is that gawk now pays attention to locales.  If you
set LC_ALL=C in your environment, you get the same behavior as the
old version.  Alternately, you can fix your program so that locales
won't affect it:

--- maketypes.awk       2003-02-06 15:31:48.000000000 +0200
+++ maketypes2.awk      2003-02-06 16:37:32.000000000 +0200
@@ -40,10 +40,10 @@
   
   tmp = type_name;
 # OK, the following is ridiculous, and sed s///g would be far easier
-  gsub ("[A-Z]", "@&", tmp);
-  gsub ("[^A-Z]@", "&_", tmp);
+  gsub ("[[:upper:]]", "@&", tmp);
+  gsub ("[^[:upper:]]@", "&_", tmp);
   gsub ("@", "", tmp);
-  gsub ("[A-Z][A-Z][A-Z][0-9a-z]", "@&", tmp);
+  gsub ("[[:upper:]][[:upper:]][[:upper:]][[:digit:][:lower:]]", "@&", tmp);
   gsub ("@..", "&_", tmp);
   gsub ("@", "", tmp);
   type_macro = type_macro toupper (tmp);

Hope this helps,

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]