From: Mark Wooding Date: Sun, 3 May 2009 00:40:25 +0000 (+0100) Subject: Headers: Guard inclusion of mLib headers. X-Git-Tag: 2.2.0~8 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/dd3c57bc8cac59e0d657ee665ce462988d27d714?hp=e109873133d224df7973bceedae82172924cd69e Headers: Guard inclusion of mLib headers. A number of headers include other mLib headers without #ifndef guards. This will slow down compilation slightly on some (less sensible) compilers. --- diff --git a/base32.h b/base32.h index 3451778..a6333e9 100644 --- a/base32.h +++ b/base32.h @@ -34,7 +34,9 @@ /*----- Header files ------------------------------------------------------*/ -#include "dstr.h" +#ifndef MLIB_DSTR_H +# include "dstr.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/base64.h b/base64.h index 22a8318..4a0a19d 100644 --- a/base64.h +++ b/base64.h @@ -34,7 +34,9 @@ /*----- Header files ------------------------------------------------------*/ -#include "dstr.h" +#ifndef MLIB_DSTR_H +# include "dstr.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/bres.h b/bres.h index df14fd6..7d0b6dd 100644 --- a/bres.h +++ b/bres.h @@ -45,8 +45,13 @@ # include #endif -#include "sel.h" -#include "selbuf.h" +#ifndef MLIB_SEL_H +# include "sel.h" +#endif + +#ifndef MLIB_SELBUF_H +# include "selbuf.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/dspool.h b/dspool.h index b7f64f5..47ca6e2 100644 --- a/dspool.h +++ b/dspool.h @@ -33,8 +33,13 @@ /*----- Header files ------------------------------------------------------*/ -#include "dstr.h" -#include "sub.h" +#ifndef MLIB_DSTR_H +# include "dstr.h" +#endif + +#ifndef MLIB_SUB_H +# include "sub.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/hex.h b/hex.h index c6b8fe3..3fee0ea 100644 --- a/hex.h +++ b/hex.h @@ -34,7 +34,9 @@ /*----- Header files ------------------------------------------------------*/ -#include "dstr.h" +#ifndef MLIB_DSTR_H +# include "dstr.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/sig.h b/sig.h index 75a8eac..02baef6 100644 --- a/sig.h +++ b/sig.h @@ -36,7 +36,9 @@ #include -#include "sel.h" +#ifndef MLIB_SEL_H +# include "sel.h" +#endif /*----- Data structures ---------------------------------------------------*/ diff --git a/testrig.h b/testrig.h index 3729794..7a7fdb3 100644 --- a/testrig.h +++ b/testrig.h @@ -36,8 +36,13 @@ #include -#include "bits.h" -#include "dstr.h" +#ifndef MLIB_BITS_H +# include "bits.h" +#endif + +#ifndef MLIB_DSTR_H +# include "dstr.h" +#endif /*----- Magical numbers ---------------------------------------------------*/