[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Drop gnulib fix-base64.patch
From: |
Daniel Axtens |
Subject: |
Re: [PATCH] Drop gnulib fix-base64.patch |
Date: |
Wed, 24 Nov 2021 02:33:55 +1100 |
Robbie Harwood <rharwood@redhat.com> writes:
> Originally added in 9fbdec2f6b4fa8b549daa4d49134d1fe89d95ef9 and
> subsequently modified in 552c9fd08122a3036c724ce96dfe68aa2f75705f,
> fix-base64.patch handled two problems we have using gnulib, which are
> exerciesd by the base64 module but not directly caused by it.
>
> First, grub2 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>
> ---
> bootstrap.conf | 3 ++-
> config.h.in | 3 +++
> grub-core/lib/gnulib-patches/fix-base64.patch | 21 -------------------
> grub-core/lib/posix_wrap/sys/types.h | 7 +++----
> grub-core/lib/xzembed/xz.h | 5 +----
> 5 files changed, 9 insertions(+), 30 deletions(-)
> delete mode 100644 grub-core/lib/gnulib-patches/fix-base64.patch
>
> 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/config.h.in b/config.h.in
> index 9e8f9911b..2b65c86c4 100644
> --- a/config.h.in
> +++ b/config.h.in
> @@ -64,4 +64,7 @@
>
> #define _GNU_SOURCE 1
>
> +/* For gnulib's base64 code. */
> +#define _GL_ATTRIBUTE_CONST /* empty */
Do we support any compiler so old or configuration so weird that we
can't simply use 'const' here?
Kind regards,
Daniel
- Re: [PATCH] Drop gnulib fix-base64.patch, Darren Kenny, 2021/11/03
- Re: [PATCH] Drop gnulib fix-base64.patch, Patrick Steinhardt, 2021/11/14
- Re: [PATCH] Drop gnulib fix-base64.patch,
Daniel Axtens <=
- Re: [PATCH] Drop gnulib fix-base64.patch, Robbie Harwood, 2021/11/23
- Re: [PATCH] Drop gnulib fix-base64.patch, Daniel Kiper, 2021/11/23
- Re: [PATCH] Drop gnulib fix-base64.patch, Robbie Harwood, 2021/11/24
- Re: [PATCH] Drop gnulib fix-base64.patch, Daniel Kiper, 2021/11/25
- Re: [PATCH] Drop gnulib fix-base64.patch, Robbie Harwood, 2021/11/29
- Re: [PATCH] Drop gnulib fix-base64.patch, Daniel Kiper, 2021/11/30