]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update from gnulib.
authorBruno Haible <bruno@clisp.org>
Mon, 6 Dec 2010 22:30:54 +0000 (23:30 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Jun 2011 21:38:50 +0000 (23:38 +0200)
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/fcntl-o.m4
gettext-runtime/m4/iconv.m4
gettext-runtime/m4/intdiv0.m4

index ed1e30641421247645bb57a8fa1de76636625b9a..e042c657680036461f87586e3b98f53ab02569cb 100644 (file)
@@ -1,3 +1,12 @@
+2010-12-04  Bruno Haible  <bruno@clisp.org>
+
+       Put more information about failed tests into the test return codes.
+       * intdiv0.m4 (gt_INTDIV0): Change test program so that it returns an
+       enumerated value (0, 1, 2, 3, 4, ...).
+       * fcntl-o.m4 (gl_FCNTL_O_FLAGS): Change test program so that it returns
+       a bit mask.
+       * iconv.m4 (AM_ICONV_LINK): Likewise.
+
 2010-11-26  Bruno Haible  <bruno@clisp.org>
 
        * iconv.m4 (AM_ICONV): If the gnulib module 'iconv-h' is present, set
index 1adacc8ab7898d257a6900c435dfe653af26fb8e..46fad47021ff8988f6da1b454b28555d110c044e 100644 (file)
@@ -1,4 +1,4 @@
-# fcntl-o.m4 serial 2
+# fcntl-o.m4 serial 3
 dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -37,34 +37,61 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
             };
           ]],
           [[
-            int status = !constants;
+            int result = !constants;
             {
               static char const sym[] = "conftest.sym";
-              if (symlink (".", sym) != 0
-                  || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
-                status |= 32;
+              if (symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
               unlink (sym);
             }
             {
               static char const file[] = "confdefs.h";
               int fd = open (file, O_RDONLY | O_NOATIME);
-              char c;
-              struct stat st0, st1;
-              if (fd < 0
-                  || fstat (fd, &st0) != 0
-                  || sleep (1) != 0
-                  || read (fd, &c, 1) != 1
-                  || close (fd) != 0
-                  || stat (file, &st1) != 0
-                  || st0.st_atime != st1.st_atime)
-                status |= 64;
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
             }
-            return status;]])],
+            return result;]])],
        [gl_cv_header_working_fcntl_h=yes],
        [case $? in #(
-        32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
-        96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
          *) gl_cv_header_working_fcntl_h='no';;
         esac],
        [gl_cv_header_working_fcntl_h=cross-compiling])])
index 7d19594230971c86e073438274d1c217b23001b0..006c90780afa3c7bf9d44a57e8670dfdc7f9552b 100644 (file)
@@ -1,4 +1,4 @@
-# iconv.m4 serial 16 (gettext-0.18.2)
+# iconv.m4 serial 17 (gettext-0.18.2)
 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -78,6 +78,7 @@ AC_DEFUN([AM_ICONV_LINK],
 #include <string.h>
 int main ()
 {
+  int result = 0;
   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
      returns.  */
   {
@@ -94,7 +95,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
       }
   }
   /* Test against Solaris 10 bug: Failures are not distinguishable from
@@ -113,7 +115,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
       }
   }
   /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
@@ -131,7 +134,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
-          return 1;
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #if 0 /* This bug could be worked around by the caller.  */
@@ -150,7 +154,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if ((int)res > 0)
-          return 1;
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #endif
@@ -164,8 +169,8 @@ int main ()
       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
       /* Try HP-UX names.  */
       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    return 1;
-  return 0;
+    result |= 16;
+  return result;
 }]])],
         [am_cv_func_iconv_works=yes],
         [am_cv_func_iconv_works=no],
index 9b27ff1b79d144ecad2537a88e8098ba4b19002c..562882defec289a444cc32af8c2732cbe8523bb4 100644 (file)
@@ -1,4 +1,4 @@
-# intdiv0.m4 serial 4 (gettext-0.18.2)
+# intdiv0.m4 serial 5 (gettext-0.18.2)
 dnl Copyright (C) 2002, 2007-2008, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -60,7 +60,7 @@ int main ()
 
   z = x / y;
   nan = y / y;
-  exit (1);
+  exit (2);
 }
 ]])],
           [gt_cv_int_divbyzero_sigfpe=yes],