so there's an argument about best practice for #include statements.
many people put all the relevant #include <header.h> statements at the top of the .c source code.
some people prefer to put the relevant #include statements within the .h header file that is associated with the .c source code
consider:
Example 1
"source.c"
#include <library1.h>
#include <library2.h>
#include <library3.h>
#include "another.h"
#include "etc.h"
#include "source.h"
int main(void)
{
//etc...
"source.h"
#ifndef _SOURCE_H
#define _SOURCE_H
#define RELEVANT_MACRO_IN_SOURCE_C
//etc...
#endif
Example 2
"source.c"
#include "source.h"
int main(void)
{
//etc...
"source.h"
#ifndef _SOURCE_H
#define _SOURCE_H
#include <library1.h>
#include <library2.h>
#include <library3.h>
#include "another.h"
#include "etc.h"
#define RELEVANT_MACRO_IN_SOURCE_C
//etc...
#endif
FTR, i'm in the camp for Example 2. It's my personal preference housekeeping sort of thing, but some people claim that including #includes within the header file is bad practice.
with the include guards, i'm not sure why that would be a problem, assuming you don't have circular references.
thanks