|
From: | Vladimir 'phcoder' Serbinenko |
Subject: | Re: [GRUB PARTUUID PATCH V3 1/5] Fix flex-2.6.3 incompatbility issue |
Date: | Mon, 27 Feb 2017 00:28:58 +0000 |
---
grub-core/script/yylex.l | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
index 95b219170..3917904b4 100644
--- a/grub-core/script/yylex.l
+++ b/grub-core/script/yylex.l
@@ -31,10 +31,6 @@
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wsign-compare"
-#define yyalloc(size, scanner) (grub_malloc((size)))
-#define yyfree(ptr, scanner) (grub_free((ptr)))
-#define yyrealloc(ptr, size, scanner) (grub_realloc((ptr), (size)))
-
/*
* As we don't have access to yyscanner, we cannot do much except to
* print the fatal error.
@@ -327,6 +323,24 @@ POS_MULTILINE {WORD}?\\\n
}
%%
+void *
+yyalloc(yy_size_t size, yyscan_t yyscanner)
+{
+ return grub_malloc(size);
+}
+
+void
+yyfree(void *ptr, yyscan_t yyscanner)
+{
+ return grub_free(ptr);
+}
+
+void *
+yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner)
+{
+ return grub_realloc(ptr, size);
+}
+
int
yywrap (yyscan_t yyscanner)
{
--
2.12.0
_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel
[Prev in Thread] | Current Thread | [Next in Thread] |