diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-05-09 08:47:05 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-05-09 08:50:57 -0700 |
commit | ebfb2c4d1bc8f68a75b02a76ec90eb225123c099 (patch) | |
tree | 789194d7ff4743ec48ea9d47a8c7ee08471cecdf /lib | |
parent | ae3c510696f02f01d03052f070e5ce65b4018a45 (diff) | |
download | emacs-ebfb2c4d1bc8f68a75b02a76ec90eb225123c099.tar.gz emacs-ebfb2c4d1bc8f68a75b02a76ec90eb225123c099.tar.bz2 emacs-ebfb2c4d1bc8f68a75b02a76ec90eb225123c099.zip |
Update from Gnulib
This incorporates:
2020-05-09 stdio: don't redefine _GL_ATTRIBUTE_FORMAT
2020-05-09 dirent, stdlib, string: don't redefine _GL_ATTRIBUTE_PURE
2020-05-08 limits-h: define LONG_BIT correctly on Haiku/x86_64
2020-05-08 ignore-value tests: use module 'attribute'
2020-05-06 attribute: minor style fixes
* build-aux/config.sub, doc/misc/texinfo.tex, lib/attribute.h:
* lib/dirent.in.h, lib/limits.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, m4/gnulib-common.m4:
Copy from Gnulib.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attribute.h | 12 | ||||
-rw-r--r-- | lib/dirent.in.h | 10 | ||||
-rw-r--r-- | lib/limits.in.h | 23 | ||||
-rw-r--r-- | lib/stdio.in.h | 10 | ||||
-rw-r--r-- | lib/stdlib.in.h | 10 | ||||
-rw-r--r-- | lib/string.in.h | 10 |
6 files changed, 50 insertions, 25 deletions
diff --git a/lib/attribute.h b/lib/attribute.h index 8ef9a399ade..c5919d97005 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -33,26 +33,26 @@ /* Selected GCC attributes; see: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html These names begin with 'ATTRIBUTE_' to avoid name clashes. */ -#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE(args) +#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args) #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE #define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL #define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST #define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED -#define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR(msg) +#define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR (msg) #define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT(spec) +#define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT (spec) #define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS #define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC #define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE -#define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL(args) +#define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL (args) #define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING #define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW #define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE #define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL -#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL(pos) -#define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING(msg) +#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos) +#define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING (msg) #endif /* _GL_ATTRIBUTE_H */ diff --git a/lib/dirent.in.h b/lib/dirent.in.h index f7c26810158..6fa44f0d28d 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -57,10 +57,12 @@ typedef struct gl_directory DIR; /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ diff --git a/lib/limits.in.h b/lib/limits.in.h index 90c273fa178..d25c5237060 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -15,16 +15,32 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>. */ -#ifndef _@GUARD_PREFIX@_LIMITS_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ -/* The include_next requires a split double-inclusion guard. */ +#if defined _GL_ALREADY_INCLUDING_LIMITS_H +/* Special invocation convention: + On Haiku/x86_64, we have a sequence of nested includes + <limits.h> -> <syslimits.h> -> <limits.h>. + In this situation, LONG_MAX and INT_MAX are not yet defined, + therefore we should not attempt to define LONG_BIT. */ + #@INCLUDE_NEXT@ @NEXT_LIMITS_H@ +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_LIMITS_H + +# define _GL_ALREADY_INCLUDING_LIMITS_H + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_LIMITS_H@ + +# undef _GL_ALREADY_INCLUDING_LIMITS_H + #ifndef _@GUARD_PREFIX@_LIMITS_H #define _@GUARD_PREFIX@_LIMITS_H @@ -102,3 +118,4 @@ #endif /* _@GUARD_PREFIX@_LIMITS_H */ #endif /* _@GUARD_PREFIX@_LIMITS_H */ +#endif diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 4a95f323a9a..6c338dd6c0b 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -62,10 +62,12 @@ We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +# endif #endif /* _GL_ATTRIBUTE_FORMAT_PRINTF diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index ec5f124a366..59f9e6c71d1 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -101,10 +101,12 @@ struct random_data /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif #endif /* The definition of _Noreturn is copied here. */ diff --git a/lib/string.in.h b/lib/string.in.h index 596c99bf2e2..96e132f37d7 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -54,10 +54,12 @@ /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif #endif /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ |