Next: , Previous: File Headers, Up: Coding Conventions


5.2 Inclusion of Header Files

The order of the #include directives in any .c file shall be:

     /*
      * ... file header ...
      */
     
     #include <config.h>
     
     #include <system-file-1.h>
     #include <system-file-2.h>
     ...
     #include <system-file-N.h>
     
     #include <lib-file-1.h>
     #include <lib-file-2.h>
     ...
     #include <lib-file-N.h>

Note the empty lines separating the several blocks.

In particular:

If some headers shall be included conditionally depending on the host platform, the macros PDF_HOST_* defined in config.h can be used. Those macros are set using autoheader.