aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2020-02-09 00:44:11 -0800
committerPaul Eggert2020-02-09 00:45:42 -0800
commit5e7bead8eac9a79dfd74452a7bd5199f12ad0c45 (patch)
tree449a49b0635fc2f8d6acb43bcbaabf6621de4015 /lib
parent2645ae1222db1df270276b227e5102884466ecb0 (diff)
downloademacs-5e7bead8eac9a79dfd74452a7bd5199f12ad0c45.tar.gz
emacs-5e7bead8eac9a79dfd74452a7bd5199f12ad0c45.zip
Update from Gnulib
This incorporates: 2020-02-08 lchmod: ensure declaration on HP-UX 2020-02-08 fchmodat: fix endless recursion on Cygwin 2020-02-08 Fix compilation errors in a testdir 2020-02-07 fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks 2020-02-04 Port _Noreturn to older Clang 2020-02-03 libc-config: port to Apple’s Clang variant * lib/_Noreturn.h, lib/c++defs.h, lib/libc-config.h, lib/sys_stat.in.h: * m4/gnulib-common.m4, m4/sys_stat_h.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'lib')
-rw-r--r--lib/_Noreturn.h5
-rw-r--r--lib/c++defs.h3
-rw-r--r--lib/gnulib.mk.in4
-rw-r--r--lib/libc-config.h13
-rw-r--r--lib/sys_stat.in.h41
5 files changed, 42 insertions, 24 deletions
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h
index 0d4b9c29e02..394ca3c2aa2 100644
--- a/lib/_Noreturn.h
+++ b/lib/_Noreturn.h
@@ -28,7 +28,10 @@
28# define _Noreturn [[noreturn]] 28# define _Noreturn [[noreturn]]
29# elif ((!defined __cplusplus || defined __clang__) \ 29# elif ((!defined __cplusplus || defined __clang__) \
30 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ 30 && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
31 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))) 31 || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
32 || (defined __apple_build_version__ \
33 ? 6000000 <= __apple_build_version__ \
34 : 3 < __clang_major__ + (5 <= __clang_minor__))))
32 /* _Noreturn works as-is. */ 35 /* _Noreturn works as-is. */
33# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C 36# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
34# define _Noreturn __attribute__ ((__noreturn__)) 37# define _Noreturn __attribute__ ((__noreturn__))
diff --git a/lib/c++defs.h b/lib/c++defs.h
index 7a057633883..3e6aaabc9ce 100644
--- a/lib/c++defs.h
+++ b/lib/c++defs.h
@@ -301,9 +301,6 @@
301 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 301 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
302 "The symbol ::" #func " refers to the system function. " \ 302 "The symbol ::" #func " refers to the system function. " \
303 "Use " #namespace "::" #func " instead.") 303 "Use " #namespace "::" #func " instead.")
304# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
305# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
306 extern __typeof__ (func) func
307# else 304# else
308# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 305# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
309 _GL_EXTERN_C int _gl_cxxalias_dummy 306 _GL_EXTERN_C int _gl_cxxalias_dummy
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 1c8085b1a41..6775db00015 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -854,6 +854,7 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@
854REPLACE_DUP = @REPLACE_DUP@ 854REPLACE_DUP = @REPLACE_DUP@
855REPLACE_DUP2 = @REPLACE_DUP2@ 855REPLACE_DUP2 = @REPLACE_DUP2@
856REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ 856REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
857REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
857REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ 858REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
858REPLACE_FCLOSE = @REPLACE_FCLOSE@ 859REPLACE_FCLOSE = @REPLACE_FCLOSE@
859REPLACE_FCNTL = @REPLACE_FCNTL@ 860REPLACE_FCNTL = @REPLACE_FCNTL@
@@ -885,6 +886,7 @@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
885REPLACE_GMTIME = @REPLACE_GMTIME@ 886REPLACE_GMTIME = @REPLACE_GMTIME@
886REPLACE_INITSTATE = @REPLACE_INITSTATE@ 887REPLACE_INITSTATE = @REPLACE_INITSTATE@
887REPLACE_ISATTY = @REPLACE_ISATTY@ 888REPLACE_ISATTY = @REPLACE_ISATTY@
889REPLACE_LCHMOD = @REPLACE_LCHMOD@
888REPLACE_LCHOWN = @REPLACE_LCHOWN@ 890REPLACE_LCHOWN = @REPLACE_LCHOWN@
889REPLACE_LINK = @REPLACE_LINK@ 891REPLACE_LINK = @REPLACE_LINK@
890REPLACE_LINKAT = @REPLACE_LINKAT@ 892REPLACE_LINKAT = @REPLACE_LINKAT@
@@ -2935,9 +2937,11 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
2935 -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ 2937 -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
2936 -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ 2938 -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
2937 -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ 2939 -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
2940 -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
2938 -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ 2941 -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
2939 -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ 2942 -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
2940 -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ 2943 -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
2944 -e 's|@''REPLACE_LCHMOD''@|$(REPLACE_LCHMOD)|g' \
2941 -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ 2945 -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
2942 -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ 2946 -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
2943 -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ 2947 -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
diff --git a/lib/libc-config.h b/lib/libc-config.h
index aef1f793242..124f1d77e01 100644
--- a/lib/libc-config.h
+++ b/lib/libc-config.h
@@ -55,8 +55,17 @@
55 55
56#ifndef __glibc_clang_prereq 56#ifndef __glibc_clang_prereq
57# if defined __clang_major__ && defined __clang_minor__ 57# if defined __clang_major__ && defined __clang_minor__
58# define __glibc_clang_prereq(maj, min) \ 58# ifdef __apple_build_version__
59 ((maj) < __clang_major__ + ((min) <= __clang_minor__)) 59/* Apple for some reason renumbers __clang_major__ and __clang_minor__.
60 Gnulib code uses only __glibc_clang_prereq (3, 5); map it to
61 6000000 <= __apple_build_version__. Support for other calls to
62 __glibc_clang_prereq can be added here as needed. */
63# define __glibc_clang_prereq(maj, min) \
64 ((maj) == 3 && (min) == 5 ? 6000000 <= __apple_build_version__ : 0)
65# else
66# define __glibc_clang_prereq(maj, min) \
67 ((maj) < __clang_major__ + ((min) <= __clang_minor__))
68# endif
60# else 69# else
61# define __glibc_clang_prereq(maj, min) 0 70# define __glibc_clang_prereq(maj, min) 0
62# endif 71# endif
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index c1e3243c1fe..e3ab3153fbf 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -392,13 +392,25 @@ struct stat
392 392
393 393
394#if @GNULIB_FCHMODAT@ 394#if @GNULIB_FCHMODAT@
395# if !@HAVE_FCHMODAT@ 395# if @REPLACE_FCHMODAT@
396# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
397# undef fchmodat
398# define fchmodat rpl_fchmodat
399# endif
400_GL_FUNCDECL_RPL (fchmodat, int,
401 (int fd, char const *file, mode_t mode, int flag)
402 _GL_ARG_NONNULL ((2)));
403_GL_CXXALIAS_RPL (fchmodat, int,
404 (int fd, char const *file, mode_t mode, int flag));
405# else
406# if !@HAVE_FCHMODAT@
396_GL_FUNCDECL_SYS (fchmodat, int, 407_GL_FUNCDECL_SYS (fchmodat, int,
397 (int fd, char const *file, mode_t mode, int flag) 408 (int fd, char const *file, mode_t mode, int flag)
398 _GL_ARG_NONNULL ((2))); 409 _GL_ARG_NONNULL ((2)));
399# endif 410# endif
400_GL_CXXALIAS_SYS (fchmodat, int, 411_GL_CXXALIAS_SYS (fchmodat, int,
401 (int fd, char const *file, mode_t mode, int flag)); 412 (int fd, char const *file, mode_t mode, int flag));
413# endif
402_GL_CXXALIASWARN (fchmodat); 414_GL_CXXALIASWARN (fchmodat);
403#elif defined GNULIB_POSIXCHECK 415#elif defined GNULIB_POSIXCHECK
404# undef fchmodat 416# undef fchmodat
@@ -502,31 +514,24 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
502#if @GNULIB_LCHMOD@ 514#if @GNULIB_LCHMOD@
503/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME 515/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
504 denotes a symbolic link. */ 516 denotes a symbolic link. */
505# if !@HAVE_LCHMOD@ 517# if @REPLACE_LCHMOD@
506/* The lchmod replacement follows symbolic links. Callers should take
507 this into account; lchmod should be applied only to arguments that
508 are known to not be symbolic links. On hosts that lack lchmod,
509 this can lead to race conditions between the check and the
510 invocation of lchmod, but we know of no workarounds that are
511 reliable in general. You might try requesting support for lchmod
512 from your operating system supplier. */
513# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 518# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
514# define lchmod chmod 519# undef lchmod
520# define lchmod rpl_lchmod
515# endif 521# endif
516/* Need to cast, because on mingw, the second parameter of chmod is 522_GL_FUNCDECL_RPL (lchmod, int,
517 int mode. */ 523 (char const *filename, mode_t mode)
518_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, 524 _GL_ARG_NONNULL ((1)));
519 (const char *filename, mode_t mode)); 525_GL_CXXALIAS_RPL (lchmod, int,
526 (char const *filename, mode_t mode));
520# else 527# else
521# if 0 /* assume already declared */ 528# if !@HAVE_LCHMOD@ || defined __hpux
522_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) 529_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
523 _GL_ARG_NONNULL ((1))); 530 _GL_ARG_NONNULL ((1)));
524# endif 531# endif
525_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); 532_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
526# endif 533# endif
527# if @HAVE_LCHMOD@
528_GL_CXXALIASWARN (lchmod); 534_GL_CXXALIASWARN (lchmod);
529# endif
530#elif defined GNULIB_POSIXCHECK 535#elif defined GNULIB_POSIXCHECK
531# undef lchmod 536# undef lchmod
532# if HAVE_RAW_DECL_LCHMOD 537# if HAVE_RAW_DECL_LCHMOD