[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Man-db-devel] man-db does not work on Solaris 11
From: |
Colin Watson |
Subject: |
Re: [Man-db-devel] man-db does not work on Solaris 11 |
Date: |
Thu, 9 Feb 2012 08:23:04 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Thanks! Contrary to my previous surmise, this is not a gnulib bug; it's
a bug in man-db for failing to ensure that config.h is included at the
very top of the flex scanner. I've committed a patch to fix this.
Here's a version which should apply on top of either 2.6.0 or 2.6.1-pre1
and build even if you don't have flex installed.
diff -ru man-db/src/lexgrog.l man-db/src/lexgrog.l
--- man-db/src/lexgrog.l 2012-02-09 08:19:50.000000000 +0000
+++ man-db/src/lexgrog.l 2012-02-09 01:38:15.000000000 +0000
@@ -1,3 +1,9 @@
+%top{
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+}
+
%{
/*
@@ -31,10 +37,6 @@
#undef PROFILE
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
diff -ru man-db/src/lexgrog.c man-db/src/lexgrog.c
--- man-db/src/lexgrog.c 2012-02-05 21:54:27.000000000 +0000
+++ man-db/src/lexgrog.c 2012-02-09 08:14:32.000000000 +0000
@@ -1,5 +1,11 @@
+#line 2 "lexgrog.l"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
-#line 3 "lexgrog.c"
+
+#line 9 "lexgrog.c"
#define YY_INT_ALIGNED short int
@@ -2514,7 +2520,8 @@
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "lexgrog.l"
-#line 2 "lexgrog.l"
+
+#line 8 "lexgrog.l"
/*
* lexgrog.l: extract 'whatis' info from nroff man / formatted cat pages.
@@ -2547,10 +2554,6 @@
#undef PROFILE
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
diff -ru man-db/src/zsoelim.l man-db/src/zsoelim.l
--- man-db/src/zsoelim.l 2012-02-09 08:19:50.000000000 +0000
+++ man-db/src/zsoelim.l 2012-02-09 01:39:23.000000000 +0000
@@ -1,3 +1,9 @@
+%top{
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+}
+
%{
/*
@@ -40,10 +46,6 @@
#define MAX_SO_DEPTH 10 /* max .so recursion depth */
#undef ACCEPT_QUOTES /* accept quoted roff requests */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
diff -ru man-db/src/zsoelim.c man-db/src/zsoelim.c
--- man-db/src/zsoelim.c 2011-03-20 02:45:26.000000000 +0000
+++ man-db/src/zsoelim.c 2012-02-09 08:14:33.000000000 +0000
@@ -1,5 +1,11 @@
+#line 2 "zsoelim.l"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+
-#line 3 "zsoelim.c"
+#line 9 "zsoelim.c"
#define YY_INT_ALIGNED short int
@@ -768,7 +774,8 @@
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "zsoelim.l"
-#line 2 "zsoelim.l"
+
+#line 8 "zsoelim.l"
/*
* zsoelim.l: eliminate .so includes within *roff source
@@ -810,10 +817,6 @@
#define MAX_SO_DEPTH 10 /* max .so recursion depth */
#undef ACCEPT_QUOTES /* accept quoted roff requests */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif /* HAVE_CONFIG_H */
-
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
Cheers,
--
Colin Watson address@hidden
- Re: [Man-db-devel] man-db does not work on Solaris 11, Colin Watson, 2012/02/04
- Re: [Man-db-devel] man-db does not work on Solaris 11, Clark J. Wang, 2012/02/06
- Re: [Man-db-devel] man-db does not work on Solaris 11, Colin Watson, 2012/02/06
- Re: [Man-db-devel] man-db does not work on Solaris 11, Clark J. Wang, 2012/02/07
- Re: [Man-db-devel] man-db does not work on Solaris 11, Colin Watson, 2012/02/08
- Re: [Man-db-devel] man-db does not work on Solaris 11, Clark J. Wang, 2012/02/08
- Re: [Man-db-devel] man-db does not work on Solaris 11,
Colin Watson <=
- Re: [Man-db-devel] man-db does not work on Solaris 11, Clark J. Wang, 2012/02/09
- Re: [Man-db-devel] man-db does not work on Solaris 11, Colin Watson, 2012/02/13
- Re: [Man-db-devel] man-db does not work on Solaris 11, Clark J. Wang, 2012/02/07