| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| From: Daniel Axtens <dja@axtens.net> |
| Date: Fri, 1 May 2020 17:12:23 +1000 |
| Subject: [PATCH] libtasn1: disable code not needed in grub |
| |
| We don't expect to be able to write ASN.1, only read it, |
| so we can disable some code. |
| |
| Do that with #if 0/#endif, rather than deletion. This means |
| that the difference between upstream and grub is smaller, |
| which should make updating libtasn1 easier in the future. |
| |
| With these exclusions we also avoid the need for minmax.h, |
| which is convenient because it means we don't have to |
| import it from gnulib. |
| |
| Signed-off-by: Daniel Axtens <dja@axtens.net> |
| |
| grub-core/lib/libtasn1/lib/coding.c | 12 ++++++++++-- |
| grub-core/lib/libtasn1/lib/decoding.c | 2 ++ |
| grub-core/lib/libtasn1/lib/element.c | 4 ++-- |
| grub-core/lib/libtasn1/lib/errors.c | 3 +++ |
| grub-core/lib/libtasn1/lib/structure.c | 10 ++++++---- |
| include/grub/libtasn1.h | 15 +++++++++++++++ |
| 6 files changed, 38 insertions(+), 8 deletions(-) |
| |
| diff --git a/grub-core/lib/libtasn1/lib/coding.c b/grub-core/lib/libtasn1/lib/coding.c |
| index 245ea64cf0a..52def598368 100644 |
| |
| |
| @@ -30,11 +30,11 @@ |
| #include "parser_aux.h" |
| #include <gstr.h> |
| #include "element.h" |
| -#include "minmax.h" |
| #include <structure.h> |
| |
| #define MAX_TAG_LEN 16 |
| |
| +#if 0 |
| / |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |