pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/grub2 sysutils/grub2: Fix lex issues



details:   https://anonhg.NetBSD.org/pkgsrc/rev/73d45a760641
branches:  trunk
changeset: 607485:73d45a760641
user:      marino <marino%pkgsrc.org@localhost>
date:      Sun Aug 12 13:15:12 2012 +0000

description:
sysutils/grub2: Fix lex issues

Apparently depending on the compiler and version of lex used, one could
encounter two lex problems:

1) 'yy_fatal_error' defined but not used
2) 'yy_scan_bytes' compares signed and unsigned (char and int)

This patch resolves the problem.
sysutils/grub2 currently has no support for DragonFly, and there is
significant divergence from FreeBSD.  It will require some tested
patches to hostdisk.c and getroot.c at least.

diffstat:

 sysutils/grub2/distinfo                               |   3 +-
 sysutils/grub2/patches/patch-grub-core_script_yylex.l |  28 +++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)

diffs (49 lines):

diff -r 4ff4e2fcf95d -r 73d45a760641 sysutils/grub2/distinfo
--- a/sysutils/grub2/distinfo   Sun Aug 12 12:45:54 2012 +0000
+++ b/sysutils/grub2/distinfo   Sun Aug 12 13:15:12 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2012/07/29 21:44:13 gsutre Exp $
+$NetBSD: distinfo,v 1.2 2012/08/12 13:15:12 marino Exp $
 
 SHA1 (grub-2.00.tar.gz) = fcb39b621680caf34071abcb9ec913d5da458554
 RMD160 (grub-2.00.tar.gz) = 7a4d4fc2a22dfe169c03ec54b9c9a078679aa506
@@ -10,6 +10,7 @@
 SHA1 (patch-grub-core_lib_posix__wrap_sys_types.h) = 7510953e7bbed347f5d53e4535c309c365ba2bcd
 SHA1 (patch-grub-core_lib_posix__wrap_wchar.h) = 6509696c2d5e008634b710c63cb836664d0f8a89
 SHA1 (patch-grub-core_loader_i386_pc_plan9.c) = 07c909c02210ef59647185cd9b7f43b35d58515c
+SHA1 (patch-grub-core_script_yylex.l) = 1645d167b90d1862b2d9990dfe7c357778d9a952
 SHA1 (patch-stpcpy-1.diff) = d31f8d607900fdde950d3828279d5b3b09812a39
 SHA1 (patch-stpcpy-2-gen.diff) = 8b2d08cfe798386eec7d70a3946e7a9430e75254
 SHA1 (patch-util_grub.d_10__netbsd.in) = c7ad93fc60594233d71962e625320091d8cc67e5
diff -r 4ff4e2fcf95d -r 73d45a760641 sysutils/grub2/patches/patch-grub-core_script_yylex.l
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/grub2/patches/patch-grub-core_script_yylex.l     Sun Aug 12 13:15:12 2012 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-grub-core_script_yylex.l,v 1.1 2012/08/12 13:15:12 marino Exp $
+
+Fix grub_script.yy.c errors:
+* 'yy_fatal_error' defined but not used
+* In function 'yy_scan_bytes':
+  comparison between signed and unsigned integer expression 
+
+--- grub-core/script/yylex.l.orig      2012-06-08 20:24:15.000000000 +0000
++++ grub-core/script/yylex.l
+@@ -29,6 +29,7 @@
+ #pragma GCC diagnostic ignored "-Wmissing-prototypes"
+ #pragma GCC diagnostic ignored "-Wmissing-declarations"
+ #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
++#pragma GCC diagnostic ignored "-Wsign-compare"
+ 
+ #define yyfree    grub_lexer_yyfree
+ #define yyalloc   grub_lexer_yyalloc
+@@ -38,10 +39,6 @@
+  * As we don't have access to yyscanner, we cannot do much except to
+  * print the fatal error.
+  */
+-#define YY_FATAL_ERROR(msg)                     \
+-  do {                                          \
+-    grub_printf (_("fatal error: %s\n"), _(msg));     \
+-  } while (0)
+ 
+ #define COPY(str, hint)                         \
+   do {                                          \



Home | Main Index | Thread Index | Old Index