X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fgnulib-tool.texi;h=c2ea0a6ff8282575d11b396e7af073e8ad61ae95;hb=39bc7a80b6719b1c7d0f8fb1b01380649cb8e358;hp=ca49a17d979ed5e5284efce8fbf49be873d3681b;hpb=1e4ece4ab9850fbfa88c9ec43ea518c7bc266792;p=gnulib.git diff --git a/doc/gnulib-tool.texi b/doc/gnulib-tool.texi index ca49a17d9..c2ea0a6ff 100644 --- a/doc/gnulib-tool.texi +++ b/doc/gnulib-tool.texi @@ -229,17 +229,15 @@ example, you would need to make sure that @samp{#include } is evaluated when compiling all source code files, that want to make use of @code{strdup}. -When an include file is provided by Gnulib -you shouldn't try to include the corresponding system header files -yourself, but let the gnulib header file do it. The ordering -of the definition for some symbols may be significant; the Gnulib -header files take care of that. - -For example, to use the @code{time_r} gnulib module you should -use include header file provided by the gnulib, and so -@samp{#include "time_r.h"}, but you shouldn't explicitly -@samp{#include } as it is already done in @file{time_r.h} -before the redefinition of some symbols. +In the usual case where Autoconf is creating a @file{config.h} file, +you should include @file{config.h} first, before any other include +file. That way, for example, if @file{config.h} defines +@samp{restrict} to be the empty string on a pre-C99 host, the +definition is consistent for all include files. + +You should include Gnulib-provided headers before system headers, +so that Gnulib-provided headers can adjust how a system header +behaves. A final word of warning: Gnulib currently assumes it will be responsible for @emph{all} functions that end up in the Autoconf