]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
1999-09-24 Ben Elliston <bje@cygnus.com>
authorBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Fri, 24 Sep 1999 12:50:14 +0000 (12:50 +0000)
committerBen Elliston <bje+keyword+gnu.7caf74@air.net.au>
Fri, 24 Sep 1999 12:50:14 +0000 (12:50 +0000)
* acspecific.m4 (AC_HEADER_STDC): Define ISLOWER and ISUPPER
macros correctly on EBCDIC systems. Contributed by Kurt D.
Zeilenga <kurt@openldap.org>. Fix for autoconf/6.

ChangeLog
acspecific.m4
lib/autoconf/specific.m4

index e282f3322101e9abb3d88b94a6b2e92f6c3ab6a4..323ce141008f52897d827047dce8aa5ee8888c16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-09-24  Ben Elliston  <bje@cygnus.com>
+
+       * acspecific.m4 (AC_HEADER_STDC): Define ISLOWER and ISUPPER
+       macros correctly on EBCDIC systems. Contributed by Kurt D.
+       Zeilenga <kurt@openldap.org>. Fix for autoconf/6.
+
 1999-09-24  Jim Blandy  <jimb@zwingli.cygnus.com>
 
        * acspecific.m4 (AC_C_VOLATILE): New test.
index 1ade191c625913c61e2a40a77700dae87acadc6e..3e5f56a11ecbc5944fddd15631ae5a19d125cb0e 100644 (file)
@@ -711,8 +711,15 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 AC_TRY_RUN([#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int main () { int i; for (i = 0; i < 256; i++)
 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
index 1ade191c625913c61e2a40a77700dae87acadc6e..3e5f56a11ecbc5944fddd15631ae5a19d125cb0e 100644 (file)
@@ -711,8 +711,15 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 AC_TRY_RUN([#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int main () { int i; for (i = 0; i < 256; i++)
 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);