]> git.ipfire.org Git - thirdparty/grub.git/blob - config.h.in
windows: Add _stack_chk_guard/_stack_chk_fail symbols for Windows 64-bit target
[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 GRUB_STACK_PROTECTOR_INIT @GRUB_STACK_PROTECTOR_INIT@
68
69 # define RE_ENABLE_I18N 1
70
71 # define _GNU_SOURCE 1
72
73 # ifndef _GL_INLINE_HEADER_BEGIN
74 /*
75 * gnulib gets configured against the host, not the target, and the rest of
76 * our buildsystem works around that. This is difficult to avoid as gnulib's
77 * detection requires a more capable system than our target. Instead, we
78 * reach in and set values appropriately - intentionally setting more than the
79 * bare minimum. If, when updating gnulib, something breaks, there's probably
80 * a change needed here or in grub-core/Makefile.core.def.
81 */
82 # define SIZE_MAX ((size_t) -1)
83 # define _GL_ATTRIBUTE_ALLOC_SIZE(args) \
84 __attribute__ ((__alloc_size__ args))
85 # define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
86 # define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
87 # define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
88 # define _GL_ATTRIBUTE_CONST __attribute__ ((const))
89 # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i)))
90 # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
91 # define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
92 # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
93 # define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE \
94 __attribute__ ((externally_visible))
95 # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
96 # define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
97 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc))
98 # define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
99 # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
100 # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
101 # define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
102 # define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
103 # define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
104 # define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
105 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
106 # define _GL_ATTRIBUTE_RETURNS_NONNULL \
107 __attribute__ ((__returns_nonnull__))
108 # define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
109 # define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
110 # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
111 # define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
112 # define _GL_GNUC_PREREQ GNUC_PREREQ
113 # define _GL_INLINE inline
114 # define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
115
116 /* We can't use __has_attribute for these because gcc-5.1 is too old for
117 * that. Everything above is present in that version, though. */
118 # if __GNUC__ >= 7
119 # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
120 # else
121 # define _GL_ATTRIBUTE_FALLTHROUGH /* empty */
122 # endif
123
124 # ifndef ASM_FILE
125 typedef __INT_FAST32_TYPE__ int_fast32_t;
126 typedef __UINT_FAST32_TYPE__ uint_fast32_t;
127 # endif
128
129 /* Ensure ialloc nests static/non-static inline properly. */
130 # define IALLOC_INLINE static inline
131
132 /*
133 * gnulib uses these for blocking out warnings they can't/won't fix. gnulib
134 * also makes the decision about whether to provide a declaration for
135 * reallocarray() at compile-time, so this is a convenient place to override -
136 * it's used by the ialloc module, which is used by base64.
137 */
138 # define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push") \
139 void * \
140 reallocarray (void *ptr, unsigned int nmemb, unsigned int size);
141 # define _GL_INLINE_HEADER_END _Pragma ("GCC diagnostic pop")
142 # endif /* !_GL_INLINE_HEADER_BEGIN */
143
144 /* gnulib doesn't build cleanly with older compilers. */
145 # if __GNUC__ < 11
146 _Pragma ("GCC diagnostic ignored \"-Wtype-limits\"")
147 # endif
148
149 #endif