]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(AC_FUNC_MEMCMP): Use
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Dec 2004 21:50:46 +0000 (21:50 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Dec 2004 21:50:46 +0000 (21:50 +0000)
"char c = '\200';" rather than "char c = 0x80;" as the
latter doesn't conform to the strict C standard due to
overflow on signed char hosts.

lib/autoconf/functions.m4

index b752c2968af426e89d90cce230c10617633dce1e..f6e077e1f22af2819f106b144136ce0ef20f7685 100644 (file)
@@ -910,7 +910,7 @@ AC_DEFUN([AC_FUNC_MEMCMP],
 [AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working,
 [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[
   /* Some versions of memcmp are not 8-bit clean.  */
-  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  char c0 = '\100', c1 = '\200', c2 = '\201';
   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
     exit (1);