1.make sure that the contents of a file are included only once.
#if !defined(HDR)
#define HDR
/* contents of hdr.h go here */
#endif
also we can write this way
#ifndef HDR
#define HDR
/* contents of hdr.h go here */
#endif
2.test the name SYSTEM to decide which version of a header to include
#if SYSTEM == SYSV
#define HDR "sysv.h"
#elif SYSTEM == BSD
#define HDR "bsd.h"
#elif SYSTEM == MSDOS
#define HDR "msdos.h"
#else
#define HDR "default.h"
#endif
#include HDR