aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-10-27 08:27:13 -0700
committerPaul Eggert2016-10-27 08:28:07 -0700
commit63eebff30e91f4a29d2870d42cab859e7fef628b (patch)
tree44fb2131272d7ace0225fe7fab9ab5dcb9dff93f
parent354c4a9885db314a4bd8a11cd6f11badef7b07f3 (diff)
downloademacs-63eebff30e91f4a29d2870d42cab859e7fef628b.tar.gz
emacs-63eebff30e91f4a29d2870d42cab859e7fef628b.zip
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.
-rw-r--r--lib/gnulib.mk1
-rw-r--r--lib/stdlib.in.h15
-rw-r--r--m4/st_dm_mode.m42
-rw-r--r--m4/stdint.m411
-rw-r--r--m4/stdlib_h.m45
-rw-r--r--m4/utimes.m42
6 files changed, 31 insertions, 5 deletions
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index a691a0b3233..56c210961a7 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -1258,6 +1258,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1258 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ 1258 -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
1259 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ 1259 -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
1260 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ 1260 -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
1261 -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
1261 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ 1262 -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
1262 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ 1263 -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
1263 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ 1264 -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 70dc88db753..db3253bd970 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -521,6 +521,9 @@ _GL_CXXALIASWARN (putenv);
521#endif 521#endif
522 522
523#if @GNULIB_QSORT_R@ 523#if @GNULIB_QSORT_R@
524/* Sort an array of NMEMB elements, starting at address BASE, each element
525 occupying SIZE bytes, in ascending order according to the comparison
526 function COMPARE. */
524# if @REPLACE_QSORT_R@ 527# if @REPLACE_QSORT_R@
525# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 528# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
526# undef qsort_r 529# undef qsort_r
@@ -535,12 +538,24 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
535 void *), 538 void *),
536 void *arg)); 539 void *arg));
537# else 540# else
541# if !@HAVE_QSORT_R@
542_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
543 int (*compare) (void const *, void const *,
544 void *),
545 void *arg) _GL_ARG_NONNULL ((1, 4)));
546# endif
538_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, 547_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
539 int (*compare) (void const *, void const *, 548 int (*compare) (void const *, void const *,
540 void *), 549 void *),
541 void *arg)); 550 void *arg));
542# endif 551# endif
543_GL_CXXALIASWARN (qsort_r); 552_GL_CXXALIASWARN (qsort_r);
553#elif defined GNULIB_POSIXCHECK
554# undef qsort_r
555# if HAVE_RAW_DECL_QSORT_R
556_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
557 "use gnulib module qsort_r for portability");
558# endif
544#endif 559#endif
545 560
546 561
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
index 1cfe68e4065..debd753ffe1 100644
--- a/m4/st_dm_mode.m4
+++ b/m4/st_dm_mode.m4
@@ -17,7 +17,7 @@ AC_DEFUN([AC_STRUCT_ST_DM_MODE],
17 17
18 if test $ac_cv_struct_st_dm_mode = yes; then 18 if test $ac_cv_struct_st_dm_mode = yes; then
19 AC_DEFINE([HAVE_ST_DM_MODE], [1], 19 AC_DEFINE([HAVE_ST_DM_MODE], [1],
20 [Define if struct stat has an st_dm_mode member. ]) 20 [Define if struct stat has an st_dm_mode member.])
21 fi 21 fi
22 ] 22 ]
23) 23)
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index fa6f103a63b..05b6ab7846b 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
1# stdint.m4 serial 47 1# stdint.m4 serial 48
2dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -154,6 +154,15 @@ uintptr_t h = UINTPTR_MAX;
154intmax_t i = INTMAX_MAX; 154intmax_t i = INTMAX_MAX;
155uintmax_t j = UINTMAX_MAX; 155uintmax_t j = UINTMAX_MAX;
156 156
157/* Check that SIZE_MAX has the correct type, if possible. */
158#if 201112 <= __STDC_VERSION__
159int k = _Generic (SIZE_MAX, size_t: 0);
160#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
161 || (0x5110 <= __SUNPRO_C && !__STDC__))
162extern size_t k;
163extern __typeof__ (SIZE_MAX) k;
164#endif
165
157#include <limits.h> /* for CHAR_BIT */ 166#include <limits.h> /* for CHAR_BIT */
158#define TYPE_MINIMUM(t) \ 167#define TYPE_MINIMUM(t) \
159 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) 168 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 19107c41996..3999068153d 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
1# stdlib_h.m4 serial 42 1# stdlib_h.m4 serial 43
2dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -21,7 +21,7 @@ AC_DEFUN([gl_STDLIB_H],
21#endif 21#endif
22 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt 22 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
23 initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps 23 initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
24 posix_openpt ptsname ptsname_r random random_r realpath rpmatch 24 posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
25 secure_getenv setenv setstate setstate_r srandom srandom_r 25 secure_getenv setenv setstate setstate_r srandom srandom_r
26 strtod strtoll strtoull unlockpt unsetenv]) 26 strtod strtoll strtoull unlockpt unsetenv])
27]) 27])
@@ -85,6 +85,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
85 HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) 85 HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
86 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) 86 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
87 HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) 87 HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
88 HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R])
88 HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) 89 HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
89 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) 90 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
90 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) 91 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 1876bec7996..0778185ec4f 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -145,6 +145,6 @@ main ()
145 [gl_cv_func_working_utimes=no])]) 145 [gl_cv_func_working_utimes=no])])
146 146
147 if test $gl_cv_func_working_utimes = yes; then 147 if test $gl_cv_func_working_utimes = yes; then
148 AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly. ]) 148 AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
149 fi 149 fi
150]) 150])