config.h.in 5.8 KB

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