emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 63eebff: Update from gnulib


From: Paul Eggert
Subject: [Emacs-diffs] master 63eebff: Update from gnulib
Date: Thu, 27 Oct 2016 15:28:11 +0000 (UTC)

branch: master
commit 63eebff30e91f4a29d2870d42cab859e7fef628b
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Update from gnulib
    
    This incorporates:
    2016-10-16 qsort_r: Fix macrology for platforms that lack the function.
    2016-10-13 stdint: port SIZE_MAX to glibc s390
    2016-10-11 maint: remove stray space after "." in AC_DEFINE comment.
    * lib/gnulib.mk: Regenerate.
    * lib/stdlib.in.h, m4/st_dm_mode.m4, m4/stdint.m4, m4/stdlib_h.m4:
    * m4/utimes.m4: Copy from gnulib.
---
 lib/gnulib.mk    |    1 +
 lib/stdlib.in.h  |   15 +++++++++++++++
 m4/st_dm_mode.m4 |    2 +-
 m4/stdint.m4     |   11 ++++++++++-
 m4/stdlib_h.m4   |    5 +++--
 m4/utimes.m4     |    2 +-
 6 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index a691a0b..56c2109 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -1258,6 +1258,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) \
              -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
              -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+             -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
              -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
              -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
              -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 70dc88d..db3253b 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -521,6 +521,9 @@ _GL_CXXALIASWARN (putenv);
 #endif
 
 #if @GNULIB_QSORT_R@
+/* Sort an array of NMEMB elements, starting at address BASE, each element
+   occupying SIZE bytes, in ascending order according to the comparison
+   function COMPARE.  */
 # if @REPLACE_QSORT_R@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef qsort_r
@@ -535,12 +538,24 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t 
nmemb, size_t size,
                                                   void *),
                                   void *arg));
 # else
+#  if address@hidden@
+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
+#  endif
 _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
                                   int (*compare) (void const *, void const *,
                                                   void *),
                                   void *arg));
 # endif
 _GL_CXXALIASWARN (qsort_r);
+#elif defined GNULIB_POSIXCHECK
+# undef qsort_r
+# if HAVE_RAW_DECL_QSORT_R
+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
+                 "use gnulib module qsort_r for portability");
+# endif
 #endif
 
 
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
index 1cfe68e..debd753 100644
--- a/m4/st_dm_mode.m4
+++ b/m4/st_dm_mode.m4
@@ -17,7 +17,7 @@ AC_DEFUN([AC_STRUCT_ST_DM_MODE],
 
   if test $ac_cv_struct_st_dm_mode = yes; then
     AC_DEFINE([HAVE_ST_DM_MODE], [1],
-              [Define if struct stat has an st_dm_mode member. ])
+              [Define if struct stat has an st_dm_mode member.])
   fi
  ]
 )
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index fa6f103..05b6ab7 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 47
+# stdint.m4 serial 48
 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -154,6 +154,15 @@ uintptr_t h = UINTPTR_MAX;
 intmax_t i = INTMAX_MAX;
 uintmax_t j = UINTMAX_MAX;
 
+/* Check that SIZE_MAX has the correct type, if possible.  */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+       || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
 #include <limits.h> /* for CHAR_BIT */
 #define TYPE_MINIMUM(t) \
   ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 19107c4..3999068 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 42
+# stdlib_h.m4 serial 43
 dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@ AC_DEFUN([gl_STDLIB_H],
 #endif
     ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
-    posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+    posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
     secure_getenv setenv setstate setstate_r srandom srandom_r
     strtod strtoll strtoull unlockpt unsetenv])
 ])
@@ -85,6 +85,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
+  HAVE_QSORT_R=1;            AC_SUBST([HAVE_QSORT_R])
   HAVE_RANDOM=1;             AC_SUBST([HAVE_RANDOM])
   HAVE_RANDOM_H=1;           AC_SUBST([HAVE_RANDOM_H])
   HAVE_RANDOM_R=1;           AC_SUBST([HAVE_RANDOM_R])
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 1876bec..0778185 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -145,6 +145,6 @@ main ()
        [gl_cv_func_working_utimes=no])])
 
   if test $gl_cv_func_working_utimes = yes; then
-    AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly. ])
+    AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
   fi
 ])



reply via email to

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