From 0b29ba25d68a725b275105cf4fda64383adda50e Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 23 May 2005 11:05:53 +0000 Subject: [PATCH] Add "Include ordering", based on e-mail from Bruno. --- doc/gnulib.texi | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 1311fbb55e..59a9338ba6 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -1,5 +1,5 @@ \input texinfo @c -*-texinfo-*- -@comment $Id: gnulib.texi,v 1.8 2005-05-19 13:17:34 karl Exp $ +@comment $Id: gnulib.texi,v 1.9 2005-05-23 11:05:53 jas Exp $ @comment %**start of header @setfilename gnulib.info @settitle GNU Gnulib @@ -7,7 +7,7 @@ @syncodeindex pg cp @comment %**end of header -@set UPDATED $Date: 2005-05-19 13:17:34 $ +@set UPDATED $Date: 2005-05-23 11:05:53 $ @copying This manual is for GNU Gnulib (updated @value{UPDATED}), @@ -159,6 +159,19 @@ preference might depend on whether you consider the API exported by your header file as something available for C programs only, or for C and C++ programs alike. +@subsection Include ordering + +When writing a gnulib module, or even in general, a good way to order +the @samp{#include} directives is the following. + +@itemize +@item First comes the #include "..." specifying the module being implemented. +@item Then come all the #include <...> of system or system-replacement headers, +in arbitrary order. +@item Then come all the #include "..." of gnulib and private headers, in +arbitrary order. +@end itemize + @node ctime @section ctime @findex ctime -- 2.30.2