diff --git a/bootstrap.conf b/bootstrap.conf index 0dd893c5c..21a8cf15d 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -35,6 +35,7 @@ gnulib_modules=" realloc-gnu regex save-cwd + stdbool " gnulib_tool_option_extras="\ @@ -80,7 +81,7 @@ cp -a INSTALL INSTALL.grub bootstrap_post_import_hook () { set -e - for patchname in fix-base64 fix-null-deref fix-null-state-deref fix-regcomp-uninit-token \ + for patchname in fix-null-deref fix-null-state-deref fix-regcomp-uninit-token \ fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort; do patch -d grub-core/lib/gnulib -p2 \ < "grub-core/lib/gnulib-patches/$patchname.patch" diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist index 8f1485d52..15a9b74e9 100644 --- a/conf/Makefile.extra-dist +++ b/conf/Makefile.extra-dist @@ -28,7 +28,6 @@ EXTRA_DIST += grub-core/gensymlist.sh EXTRA_DIST += grub-core/genemuinit.sh EXTRA_DIST += grub-core/genemuinitheader.sh -EXTRA_DIST += grub-core/lib/gnulib-patches/fix-base64.patch EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-deref.patch EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-state-deref.patch EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch diff --git a/config.h.in b/config.h.in index 4d4cc74cb..8808d7272 100644 --- a/config.h.in +++ b/config.h.in @@ -68,4 +68,8 @@ # define _GNU_SOURCE 1 +# ifndef _GL_INLINE_HEADER_BEGIN +# define _GL_ATTRIBUTE_CONST __attribute__ ((const)) +# endif /* !_GL_INLINE_HEADER_BEGIN */ + #endif diff --git a/grub-core/lib/gnulib-patches/fix-base64.patch b/grub-core/lib/gnulib-patches/fix-base64.patch deleted file mode 100644 index 985db1279..000000000 --- a/grub-core/lib/gnulib-patches/fix-base64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/lib/base64.h b/lib/base64.h -index 9cd0183b8..185a2afa1 100644 ---- a/lib/base64.h -+++ b/lib/base64.h -@@ -21,8 +21,14 @@ - /* Get size_t. */ - # include - --/* Get bool. */ --# include -+#ifndef GRUB_POSIX_BOOL_DEFINED -+typedef enum { false = 0, true = 1 } bool; -+#define GRUB_POSIX_BOOL_DEFINED 1 -+#endif -+ -+#ifndef _GL_ATTRIBUTE_CONST -+# define _GL_ATTRIBUTE_CONST /* empty */ -+#endif - - # ifdef __cplusplus - extern "C" { diff --git a/grub-core/lib/posix_wrap/sys/types.h b/grub-core/lib/posix_wrap/sys/types.h index 854eb0122..eeda543c4 100644 --- a/grub-core/lib/posix_wrap/sys/types.h +++ b/grub-core/lib/posix_wrap/sys/types.h @@ -23,11 +23,10 @@ #include +/* Provided by gnulib if not present. */ +#include + typedef grub_ssize_t ssize_t; -#ifndef GRUB_POSIX_BOOL_DEFINED -typedef enum { false = 0, true = 1 } bool; -#define GRUB_POSIX_BOOL_DEFINED 1 -#endif typedef grub_uint8_t uint8_t; typedef grub_uint16_t uint16_t; diff --git a/grub-core/lib/xzembed/xz.h b/grub-core/lib/xzembed/xz.h index f7b32d800..d1417039a 100644 --- a/grub-core/lib/xzembed/xz.h +++ b/grub-core/lib/xzembed/xz.h @@ -29,10 +29,7 @@ #include #include #include - -#ifndef GRUB_POSIX_BOOL_DEFINED -typedef enum { false = 0, true = 1 } bool; -#endif +#include /** * enum xz_ret - Return codes