gnulib: Drop fix-base64.patch

Originally added in commit 9fbdec2f (bootstrap: Add gnulib's base64
module) and subsequently modified in commit 552c9fd08 (gnulib: Fix build
of base64 when compiling with memory debugging), fix-base64.patch
handled two problems we have using gnulib, which are exercised by the
base64 module but not directly caused by it.

First, GRUB defines its own bool type, while gnulib expects the
equivalent of stdbool.h to be present. Rather than patching gnulib,
instead use gnulib's stdbool module to provide a bool type if needed
(suggested by Simon Josefsson).

Second, our config.h doesn't always inherit config-util.h, which is
where gnulib-related options like _GL_ATTRIBUTE_CONST end up.
fix-base64.h worked around this by defining the attribute away, but this
workaround is better placed in config.h itself, not a gnulib patch.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Robbie Harwood authored and Daniel Kiper committed 2022-03-21 18:50:13 +01:00
1 parent 2cd52835fc
commit ea780522e1
6 files changed
+10 -31

No files matched your search

@@ -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 <stddef.h>
-/* Get bool. */
-# include <stdbool.h>
+#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" {