aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/attribute.h12
-rw-r--r--lib/dirent.in.h10
-rw-r--r--lib/limits.in.h23
-rw-r--r--lib/stdio.in.h10
-rw-r--r--lib/stdlib.in.h10
-rw-r--r--lib/string.in.h10
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 @@
33/* Selected GCC attributes; see: 33/* Selected GCC attributes; see:
34 https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html 34 https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
35 These names begin with 'ATTRIBUTE_' to avoid name clashes. */ 35 These names begin with 'ATTRIBUTE_' to avoid name clashes. */
36#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE(args) 36#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args)
37#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE 37#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
38#define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL 38#define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL
39#define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD 39#define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD
40#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST 40#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
41#define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED 41#define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED
42#define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR(msg) 42#define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR (msg)
43#define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE 43#define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
44#define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT(spec) 44#define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT (spec)
45#define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF 45#define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF
46#define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS 46#define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS
47#define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC 47#define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC
48#define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE 48#define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE
49#define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL(args) 49#define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL (args)
50#define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING 50#define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING
51#define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW 51#define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW
52#define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED 52#define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED
53#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE 53#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
54#define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL 54#define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL
55#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL(pos) 55#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos)
56#define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING(msg) 56#define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING (msg)
57 57
58#endif /* _GL_ATTRIBUTE_H */ 58#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;
57 57
58/* The __attribute__ feature is available in gcc versions 2.5 and later. 58/* The __attribute__ feature is available in gcc versions 2.5 and later.
59 The attribute __pure__ was added in gcc 2.96. */ 59 The attribute __pure__ was added in gcc 2.96. */
60#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 60#ifndef _GL_ATTRIBUTE_PURE
61# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) 61# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
62#else 62# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
63# define _GL_ATTRIBUTE_PURE /* empty */ 63# else
64# define _GL_ATTRIBUTE_PURE /* empty */
65# endif
64#endif 66#endif
65 67
66/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 68/* 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 @@
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <https://www.gnu.org/licenses/>. */ 16 along with this program; if not, see <https://www.gnu.org/licenses/>. */
17 17
18#ifndef _@GUARD_PREFIX@_LIMITS_H
19
20#if __GNUC__ >= 3 18#if __GNUC__ >= 3
21@PRAGMA_SYSTEM_HEADER@ 19@PRAGMA_SYSTEM_HEADER@
22#endif 20#endif
23@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
24 22
25/* The include_next requires a split double-inclusion guard. */ 23#if defined _GL_ALREADY_INCLUDING_LIMITS_H
24/* Special invocation convention:
25 On Haiku/x86_64, we have a sequence of nested includes
26 <limits.h> -> <syslimits.h> -> <limits.h>.
27 In this situation, LONG_MAX and INT_MAX are not yet defined,
28 therefore we should not attempt to define LONG_BIT. */
29
26#@INCLUDE_NEXT@ @NEXT_LIMITS_H@ 30#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
27 31
32#else
33/* Normal invocation convention. */
34
35#ifndef _@GUARD_PREFIX@_LIMITS_H
36
37# define _GL_ALREADY_INCLUDING_LIMITS_H
38
39/* The include_next requires a split double-inclusion guard. */
40# @INCLUDE_NEXT@ @NEXT_LIMITS_H@
41
42# undef _GL_ALREADY_INCLUDING_LIMITS_H
43
28#ifndef _@GUARD_PREFIX@_LIMITS_H 44#ifndef _@GUARD_PREFIX@_LIMITS_H
29#define _@GUARD_PREFIX@_LIMITS_H 45#define _@GUARD_PREFIX@_LIMITS_H
30 46
@@ -102,3 +118,4 @@
102 118
103#endif /* _@GUARD_PREFIX@_LIMITS_H */ 119#endif /* _@GUARD_PREFIX@_LIMITS_H */
104#endif /* _@GUARD_PREFIX@_LIMITS_H */ 120#endif /* _@GUARD_PREFIX@_LIMITS_H */
121#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 @@
62 We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because 62 We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
63 gnulib and libintl do '#define printf __printf__' when they override 63 gnulib and libintl do '#define printf __printf__' when they override
64 the 'printf' function. */ 64 the 'printf' function. */
65#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) 65#ifndef _GL_ATTRIBUTE_FORMAT
66# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) 66# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
67#else 67# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
68# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ 68# else
69# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
70# endif
69#endif 71#endif
70 72
71/* _GL_ATTRIBUTE_FORMAT_PRINTF 73/* _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
101 101
102/* The __attribute__ feature is available in gcc versions 2.5 and later. 102/* The __attribute__ feature is available in gcc versions 2.5 and later.
103 The attribute __pure__ was added in gcc 2.96. */ 103 The attribute __pure__ was added in gcc 2.96. */
104#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 104#ifndef _GL_ATTRIBUTE_PURE
105# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) 105# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
106#else 106# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
107# define _GL_ATTRIBUTE_PURE /* empty */ 107# else
108# define _GL_ATTRIBUTE_PURE /* empty */
109# endif
108#endif 110#endif
109 111
110/* The definition of _Noreturn is copied here. */ 112/* 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 @@
54 54
55/* The __attribute__ feature is available in gcc versions 2.5 and later. 55/* The __attribute__ feature is available in gcc versions 2.5 and later.
56 The attribute __pure__ was added in gcc 2.96. */ 56 The attribute __pure__ was added in gcc 2.96. */
57#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 57#ifndef _GL_ATTRIBUTE_PURE
58# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) 58# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
59#else 59# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
60# define _GL_ATTRIBUTE_PURE /* empty */ 60# else
61# define _GL_ATTRIBUTE_PURE /* empty */
62# endif
61#endif 63#endif
62 64
63/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ 65/* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */