[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inttypes.h error for Bison
From: |
Joel E. Denny |
Subject: |
Re: inttypes.h error for Bison |
Date: |
Mon, 2 Jul 2007 09:44:20 -0400 (EDT) |
On Mon, 2 Jul 2007, Bruno Haible wrote:
> But even with your patch, and even with the addition of this code to
> config.h, Joel's test case still fails.
Sorry if I'm beating a dead horse, but the patch I had in mind does work
for me. I put __STDC_LIMIT_MACROS in the stdint.h wrapper:
Index: gnulib/lib/stdint_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/stdint_.h,v
retrieving revision 1.43
diff -p -u -r1.43 stdint_.h
--- gnulib/lib/stdint_.h 21 Jun 2007 04:39:10 -0000 1.43
+++ gnulib/lib/stdint_.h 2 Jul 2007 04:22:09 -0000
@@ -43,6 +43,9 @@
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
+# if defined __cplusplus && ! defined __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+# endif
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
Will this cause trouble?
> Here we see that there is also a problem in bison:
> examples/calc++/calc++-scanner.cc is compiled through the command line
> g++ -I. -I../../lib -g -O2 ... -c -o calc++-scanner.o calc++-scanner.cc
> which makes ../../lib/inttypes.h visible, but ../../lib/config.h has never
> been included.
I must confess that I don't understand these issues. The above tests an
example from the manual that Bison users should be able to compile after
installing Bison. Do we expect Bison users to use Bison's config.h or to
use Gnulib in their parsers? I believe the examples directory is
originally Akim Demaille's work. Maybe he can comment.
- Re: inttypes.h error for Bison, (continued)
- Re: inttypes.h error for Bison, James Youngman, 2007/07/01
- Re: inttypes.h error for Bison, Joel E. Denny, 2007/07/01
- Re: inttypes.h error for Bison, Bruno Haible, 2007/07/01
- Re: inttypes.h error for Bison, Joel E. Denny, 2007/07/01
- Re: inttypes.h error for Bison, Bruno Haible, 2007/07/01
- Re: inttypes.h error for Bison, Joel E. Denny, 2007/07/01
- Re: inttypes.h error for Bison, Bruno Haible, 2007/07/01
- Re: inttypes.h error for Bison, Joel E. Denny, 2007/07/02
- Re: inttypes.h error for Bison, Paul Eggert, 2007/07/02
- Re: inttypes.h error for Bison, Bruno Haible, 2007/07/02
- Re: inttypes.h error for Bison,
Joel E. Denny <=
- Re: inttypes.h error for Bison, Bruno Haible, 2007/07/02
- Re: inttypes.h error for Bison, Joel E. Denny, 2007/07/02
- Re: inttypes.h error for Bison, Paul Eggert, 2007/07/13