[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with #include_next<stdint.h> in /usr/include/idn-int.h
From: |
Simon Josefsson |
Subject: |
Re: problem with #include_next<stdint.h> in /usr/include/idn-int.h |
Date: |
Fri, 31 Aug 2007 14:34:05 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
>> --- lib/Makefile.am.bak 2007-05-31 12:31:00.000000000 +0200
>> +++ lib/Makefile.am 2007-06-21 00:40:53.000000000 +0200
>> @@ -37,7 +37,7 @@
>>
>> idn-int.h:
>> if test -n "$(STDINT_H)"; then \
>> - cp gl/stdint.h idn-int.h; \
>> + sed -e s/include_next/include/ gl/stdint.h > idn-int.h; \
>> else \
>> echo '#include <stdint.h>' > idn-int.h; \
>> fi
>>
>>
>> If that works out, we can document it in gnulib's documentation.
>
> Yes, I'll propose a patch. Others may want to use POSIX uint*_t types
> in their public header files too, and the only way to do that portably
> appears to install your own stdint.h replacement, so documenting that
> this approach works would be good.
How about this patch? I'm not sure where a good place to add this is,
or whether it should use a @subsection or something. But the important
thing is to say something similar somewhere.
/Simon
--- stdint.texi 05 Jun 2007 18:57:54 +0200 1.4
+++ stdint.texi 31 Aug 2007 14:32:20 +0200
@@ -29,3 +29,22 @@
@item
Macros are used instead of typedefs.
@end itemize
+
+The stdint.h module uses @code{#include_next}. If you wish to install
+the generated stdint.h file under another name, typically in order to
+be able to use some of the types defined by stdint.h in your public
+header file, you could use the following Makefile.am-snippet:
+
address@hidden
+
+BUILT_SOURCES += idn-int.h
+DISTCLEANFILES += idn-int.h
+nodist_include_HEADERS += idn-int.h
+
+idn-int.h:
+ if test -n "$(STDINT_H)"; then \
+ sed -e s/include_next/include/ gl/stdint.h > idn-int.h; \
+ else \
+ echo '#include <stdint.h>' > idn-int.h; \
+ fi
address@hidden example