emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117219: Merge from gnulib.


From: Paul Eggert
Subject: [Emacs-diffs] trunk r117219: Merge from gnulib.
Date: Sun, 01 Jun 2014 23:58:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117219
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2014-06-01 16:58:38 -0700
message:
  Merge from gnulib.
  
  This incorporates:
  2014-06-02 acl: apply pure attribute to two functions
  2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL
  2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
  2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
  * lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h:
  * m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4:
  Update from gnulib.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  lib/acl-internal.h             aclinternal.h-20130507213215-pml0dup47hoa2jez-2
  lib/fcntl.in.h                 fcntl.in.h-20121114044639-6884lvvwce8v0sgb-4
  lib/ftoastr.h                  ftoastr.h-20110109011256-9ivo9ejnuk22w2iy-3
  m4/dup2.m4                     dup2.m4-20110625083406-63degt3yfgh69g2d-2
  m4/fcntl.m4                    fcntl.m4-20130707175726-ax31vjqobh17obwz-4
  m4/gnulib-common.m4            
gnulibcommon.m4-20110108211121-3ig4un4ogtyyca3s-10
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-06-01 21:27:53 +0000
+++ b/ChangeLog 2014-06-01 23:58:38 +0000
@@ -1,3 +1,14 @@
+2014-06-01  Paul Eggert  <address@hidden>
+
+       Merge from gnulib, incorporating:
+       2014-06-02 acl: apply pure attribute to two functions
+       2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL
+       2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
+       2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
+       * lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h:
+       * m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4:
+       Update from gnulib.
+
 2014-06-01  Juanma Barranquero  <address@hidden>
 
        * configure.ac (C_HEAP_SWITCH): Raise HEAPSIZE value for 32-bit

=== modified file 'lib/acl-internal.h'
--- a/lib/acl-internal.h        2014-01-01 07:43:34 +0000
+++ b/lib/acl-internal.h        2014-06-01 23:58:38 +0000
@@ -174,14 +174,14 @@
 
 /* Return 1 if the given ACL is non-trivial.
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.  */
-extern int acl_nontrivial (int count, aclent_t *entries);
+extern int acl_nontrivial (int count, aclent_t *entries) _GL_ATTRIBUTE_PURE;
 
 #  ifdef ACE_GETACL /* Solaris 10 */
 
 /* Test an ACL retrieved with ACE_GETACL.
    Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.  */
-extern int acl_ace_nontrivial (int count, ace_t *entries);
+extern int acl_ace_nontrivial (int count, ace_t *entries) _GL_ATTRIBUTE_PURE;
 
 /* Definitions for when the built executable is executed on Solaris 10
    (newer version) or Solaris 11.  */

=== modified file 'lib/fcntl.in.h'
--- a/lib/fcntl.in.h    2014-01-01 07:43:34 +0000
+++ b/lib/fcntl.in.h    2014-06-01 23:58:38 +0000
@@ -186,6 +186,22 @@
 
 /* Fix up the O_* macros.  */
 
+/* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT
+   to values outside 'int' range, so omit these misdefinitions.
+   But avoid namespace pollution on non-AIX systems.  */
+#ifdef _AIX
+# include <limits.h>
+# if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX)
+#  undef O_CLOEXEC
+# endif
+# if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX)
+#  undef O_NOFOLLOW
+# endif
+# if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX)
+#  undef O_TTY_INIT
+# endif
+#endif
+
 #if !defined O_DIRECT && defined O_DIRECTIO
 /* Tru64 spells it 'O_DIRECTIO'.  */
 # define O_DIRECT O_DIRECTIO

=== modified file 'lib/ftoastr.h'
--- a/lib/ftoastr.h     2014-01-01 07:43:34 +0000
+++ b/lib/ftoastr.h     2014-06-01 23:58:38 +0000
@@ -72,12 +72,13 @@
 
 /* _GL_FLT_PREC_BOUND is an upper bound on the precision needed to
    represent a float value without losing information.  Likewise for
-   _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double.  */
+   _GL_DBL_PREC_BOUND and double, and _GL_LDBL_PREC_BOUND and long double.
+   These are macros, not enums, to work around a bug in IBM xlc 12.1.  */
 
 #if FLT_RADIX == 10 /* decimal floating point */
- enum {  _GL_FLT_PREC_BOUND =  FLT_MANT_DIG };
- enum {  _GL_DBL_PREC_BOUND =  DBL_MANT_DIG };
- enum { _GL_LDBL_PREC_BOUND = LDBL_MANT_DIG };
+# define  _GL_FLT_PREC_BOUND  FLT_MANT_DIG
+# define  _GL_DBL_PREC_BOUND  DBL_MANT_DIG
+# define _GL_LDBL_PREC_BOUND LDBL_MANT_DIG
 #else
 
 /* An upper bound on the number of bits needed to represent a single
@@ -95,13 +96,13 @@
    DIG digits.  For why the "+ 1" is needed, see "Binary to Decimal
    Conversion" in David Goldberg's paper "What Every Computer
    Scientist Should Know About Floating-Point Arithmetic"
-   <http://docs.sun.com/source/806-3568/ncg_goldberg.html>.  */
+   <http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html>.  */
 # define _GL_FLOAT_PREC_BOUND(dig) \
    (INT_BITS_STRLEN_BOUND ((dig) * _GL_FLOAT_DIG_BITS_BOUND) + 1)
 
- enum {  _GL_FLT_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG) };
- enum {  _GL_DBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG) };
- enum { _GL_LDBL_PREC_BOUND = _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG) };
+# define  _GL_FLT_PREC_BOUND _GL_FLOAT_PREC_BOUND ( FLT_MANT_DIG)
+# define  _GL_DBL_PREC_BOUND _GL_FLOAT_PREC_BOUND ( DBL_MANT_DIG)
+# define _GL_LDBL_PREC_BOUND _GL_FLOAT_PREC_BOUND (LDBL_MANT_DIG)
 #endif
 
 

=== modified file 'm4/dup2.m4'
--- a/m4/dup2.m4        2014-01-01 07:43:34 +0000
+++ b/m4/dup2.m4        2014-06-01 23:58:38 +0000
@@ -8,6 +8,7 @@
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS_ONCE([getdtablesize])
   m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
     AC_CHECK_FUNCS_ONCE([dup2])
     if test $ac_cv_func_dup2 = no; then
@@ -23,6 +24,11 @@
 #include <fcntl.h>
 #include <errno.h>]],
            [int result = 0;
+#ifdef HAVE_GETDTABLESIZE
+            int bad_fd = getdtablesize ();
+#else
+            int bad_fd = 1000000;
+#endif
 #ifdef FD_CLOEXEC
             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
               result |= 1;
@@ -37,7 +43,7 @@
             if (dup2 (0, 0) != -1)
               result |= 8;
             /* Many gnulib modules require POSIX conformance of EBADF.  */
-            if (dup2 (2, 1000000) == -1 && errno != EBADF)
+            if (dup2 (2, bad_fd) == -1 && errno != EBADF)
               result |= 16;
             /* Flush out some cygwin core dumps.  */
             if (dup2 (2, -1) != -1 || errno != EBADF)
@@ -56,7 +62,9 @@
            linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
                    # closed fd may yield -EBADF instead of -1 / errno=EBADF.
              gl_cv_func_dup2_works="guessing no" ;;
-           freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+           aix* | freebsd*)
+                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+                   # not EBADF.
              gl_cv_func_dup2_works="guessing no" ;;
            haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
              gl_cv_func_dup2_works="guessing no" ;;

=== modified file 'm4/fcntl.m4'
--- a/m4/fcntl.m4       2014-01-01 07:43:34 +0000
+++ b/m4/fcntl.m4       2014-06-01 23:58:38 +0000
@@ -19,7 +19,7 @@
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_CHECK_FUNCS_ONCE([fcntl])
+  AC_CHECK_FUNCS_ONCE([fcntl getdtablesize])
   if test $ac_cv_func_fcntl = no; then
     gl_REPLACE_FCNTL
   else
@@ -28,11 +28,21 @@
     AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
       [gl_cv_func_fcntl_f_dupfd_works],
       [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_GETDTABLESIZE
+# include <unistd.h>
+#endif
 #include <fcntl.h>
 #include <errno.h>
 ]], [[int result = 0;
+#ifdef HAVE_GETDTABLESIZE
+      int bad_fd = getdtablesize ();
+#else
+      int bad_fd = 1000000;
+#endif
       if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
       if (errno != EINVAL) result |= 2;
+      if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+      if (errno != EINVAL) result |= 8;
       return result;
          ]])],
          [gl_cv_func_fcntl_f_dupfd_works=yes],

=== modified file 'm4/gnulib-common.m4'
--- a/m4/gnulib-common.m4       2014-02-24 07:12:42 +0000
+++ b/m4/gnulib-common.m4       2014-06-01 23:58:38 +0000
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 34
+# gnulib-common.m4 serial 35
 dnl Copyright (C) 2007-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -49,6 +49,15 @@
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
 
+/* gcc supports the "unused" attribute on possibly unused labels, and
+   g++ has since version 4.5.  */
+#if !defined __cplusplus || __GNUC__ > 4 \
+    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
 /* The __pure__ attribute was added in gcc 2.96.  */
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))


reply via email to

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