grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GRUB PARTUUID PATCH V3 1/5] Fix flex-2.6.3 incompatbility issue


From: Andrei Borzenkov
Subject: Re: [GRUB PARTUUID PATCH V3 1/5] Fix flex-2.6.3 incompatbility issue
Date: Mon, 27 Feb 2017 07:34:36 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

27.02.2017 03:28, Vladimir 'phcoder' Serbinenko пишет:
> Please explain why this patch is needed. I compile with 2.6.1 just fine
> 

There is bug introduced in flex 2.6.2 (I believe) and fixed in current
git, so in to be released 2.6.4. See

https://savannah.gnu.org/bugs/index.php?50093
https://github.com/westes/flex/issues/162

As this is really flex bug that is present only in specific version and
affects more than one project, I do not think we need special
workaround. We may mention in INSTALL to avoid these versions though.

> On Sun, Feb 26, 2017, 16:22 Nicholas Vinson <address@hidden> wrote:
> 
>> ---
>>  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)
>> +{
>>
> This is missing __attribute__ ((unused)) for second argument
> 
>> +  return grub_malloc(size);
>> +}
>> +
>> +void
>> +yyfree(void *ptr, yyscan_t yyscanner)
>> +{
>>
> Ditto
> 
>> +  return grub_free(ptr);
>> +}
>> +
>> +void *
>> +yyrealloc(void *ptr, yy_size_t size, yyscan_t yyscanner)
>> +{
>>
> Ditto
> 
>> +  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
>>
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]