Bruno Haible <[EMAIL PROTECTED]> writes:

> The following heuristics works very well in practice:
>   - First comes the #include "..." specifying the module being implemented.
>   - Then come all the #include <...> of system or system-replacement headers,
>     in arbitrary order.
>   - Then come all the #include "..." of gnulib and private headers, in
>     arbitrary order.
>
> This little problem with minmax.h is now fixed,

Sorry, I don't follow this.  Won't this run into a problem when (for
example) private headers include system headers?  E.g.,

   // module being implemented
   #include "my-interface.h"

   // system headers
   #include <stdio.h>

   // gnulib and private headers
   #include "minmax.h"
   #include "private-header.h"

where private-header.h includes <utility.h> when HAVE_UTILITY_H, and
this happens to be the first inclusion of <utility.h>.  (Solaris 10
<utility.h> defines MIN.)

And it's not just private headers: gnulib headers could have the same
problem.


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to