]> git.ipfire.org Git - thirdparty/grub.git/blob - config.h.in
gnulib: Handle warnings introduced by updated gnulib
[thirdparty/grub.git] / config.h.in
1 #undef _LARGEFILE_SOURCE
2 #undef _FILE_OFFSET_BITS
3 #define _LARGEFILE_SOURCE
4 #define _FILE_OFFSET_BITS 64
5 #if defined(__PPC__) && !defined(__powerpc__)
6 #define __powerpc__ 1
7 #endif
8
9 #define GCRYPT_NO_DEPRECATED 1
10 #define HAVE_MEMMOVE 1
11
12 #if @MM_DEBUG@
13 #define MM_DEBUG @MM_DEBUG@
14 #endif
15
16 /* Define to 1 to enable disk cache statistics. */
17 #define DISK_CACHE_STATS @DISK_CACHE_STATS@
18 #define BOOT_TIME_STATS @BOOT_TIME_STATS@
19
20 /* We don't need those. */
21 #define MINILZO_CFG_SKIP_LZO_PTR 1
22 #define MINILZO_CFG_SKIP_LZO_UTIL 1
23 #define MINILZO_CFG_SKIP_LZO_STRING 1
24 #define MINILZO_CFG_SKIP_LZO_INIT 1
25 #define MINILZO_CFG_SKIP_LZO1X_1_COMPRESS 1
26 #define MINILZO_CFG_SKIP_LZO1X_DECOMPRESS 1
27
28 #if defined (GRUB_BUILD)
29 # undef ENABLE_NLS
30 # define BUILD_SIZEOF_LONG @BUILD_SIZEOF_LONG@
31 # define BUILD_SIZEOF_VOID_P @BUILD_SIZEOF_VOID_P@
32 # if defined __APPLE__
33 # if defined __BIG_ENDIAN__
34 # define BUILD_WORDS_BIGENDIAN 1
35 # else
36 # define BUILD_WORDS_BIGENDIAN 0
37 # endif
38 # else /* !defined __APPLE__ */
39 # define BUILD_WORDS_BIGENDIAN @BUILD_WORDS_BIGENDIAN@
40 # endif /* !defined __APPLE__ */
41 #elif defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
42 # include <config-util.h>
43 #else /* !defined GRUB_UTIL && defined GRUB_MACHINE */
44 # define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
45 /* Define if C symbols get an underscore after compilation. */
46 # define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
47 /* Define it to one of __bss_start, edata and _edata. */
48 # define BSS_START_SYMBOL @BSS_START_SYMBOL@
49 /* Define it to either end or _end. */
50 # define END_SYMBOL @END_SYMBOL@
51 /* Name of package. */
52 # define PACKAGE "@PACKAGE@"
53 /* Version number of package. */
54 # define VERSION "@VERSION@"
55 /* Define to the full name and version of this package. */
56 # define PACKAGE_STRING "@PACKAGE_STRING@"
57 /* Define to the version of this package. */
58 # define PACKAGE_VERSION "@PACKAGE_VERSION@"
59 /* Define to the full name of this package. */
60 # define PACKAGE_NAME "@PACKAGE_NAME@"
61 /* Define to the address where bug reports for this package should be sent. */
62 # define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
63
64 # define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
65 # define GRUB_PLATFORM "@GRUB_PLATFORM@"
66
67 # define RE_ENABLE_I18N 1
68
69 # define _GNU_SOURCE 1
70
71 # ifndef _GL_INLINE_HEADER_BEGIN
72 /*
73 * gnulib gets configured against the host, not the target, and the rest of
74 * our buildsystem works around that. This is difficult to avoid as gnulib's
75 * detection requires a more capable system than our target. Instead, we
76 * reach in and set values appropriately - intentionally setting more than the
77 * bare minimum. If, when updating gnulib, something breaks, there's probably
78 * a change needed here or in grub-core/Makefile.core.def.
79 */
80 # define SIZE_MAX ((size_t) -1)
81 # define _GL_ATTRIBUTE_ALLOC_SIZE(args) \
82 __attribute__ ((__alloc_size__ args))
83 # define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
84 # define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
85 # define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
86 # define _GL_ATTRIBUTE_CONST __attribute__ ((const))
87 # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i)))
88 # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
89 # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
90 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
91 # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE \
92 __attribute__ ((externally_visible))
93 # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
94 # define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
95 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc))
96 # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
97 # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
98 # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
99 # define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
100 # define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
101 # define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
102 # define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
103 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
104 # define _GL_ATTRIBUTE_RETURNS_NONNULL \
105 __attribute__ ((__returns_nonnull__))
106 # define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
107 # define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
108 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
109 # define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
110 # define _GL_GNUC_PREREQ GNUC_PREREQ
111 # define _GL_INLINE inline
112 # define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
113
114 /* We can't use __has_attribute for these because gcc-5.1 is too old for
115 * that. Everything above is present in that version, though. */
116 # if __GNUC__ >= 7
117 # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
118 # else
119 # define _GL_ATTRIBUTE_FALLTHROUGH /* empty */
120 # endif
121
122 # ifndef ASM_FILE
123 typedef __INT_FAST32_TYPE__ int_fast32_t;
124 typedef __UINT_FAST32_TYPE__ uint_fast32_t;
125 # endif
126
127 /* Ensure ialloc nests static/non-static inline properly. */
128 # define IALLOC_INLINE static inline
129
130 /*
131 * gnulib uses these for blocking out warnings they can't/won't fix. gnulib
132 * also makes the decision about whether to provide a declaration for
133 * reallocarray() at compile-time, so this is a convenient place to override -
134 * it's used by the ialloc module, which is used by base64.
135 */
136 # define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push") \
137 void * \
138 reallocarray (void *ptr, unsigned int nmemb, unsigned int size);
139 # define _GL_INLINE_HEADER_END _Pragma ("GCC diagnostic pop")
140
141 /*
142 * We don't have an abort() for gnulib to call in regexp. Because gnulib is
143 * built as a separate object that is then linked with, it doesn't have any
144 * of our headers or functions around to use - so we unfortunately can't
145 * print anything. Builds of emu include the system's stdlib, which includes
146 * a prototype for abort(), so leave this as a macro that doesn't take
147 * arguments.
148 */
149 # define abort __builtin_trap
150 # endif /* !_GL_INLINE_HEADER_BEGIN */
151
152 /* gnulib doesn't build cleanly with older compilers. */
153 # if __GNUC__ < 11
154 _Pragma ("GCC diagnostic ignored \"-Wtype-limits\"")
155 # endif
156
157 #endif