From dd3c57bc8cac59e0d657ee665ce462988d27d714 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 3 May 2009 01:40:25 +0100 Subject: [PATCH] Headers: Guard inclusion of mLib headers. Organization: Straylight/Edgeware From: Mark Wooding A number of headers include other mLib headers without #ifndef guards. This will slow down compilation slightly on some (less sensible) compilers. --- base32.h | 4 +++- base64.h | 4 +++- bres.h | 9 +++++++-- dspool.h | 9 +++++++-- hex.h | 4 +++- sig.h | 4 +++- testrig.h | 9 +++++++-- 7 files changed, 33 insertions(+), 10 deletions(-) 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 ---------------------------------------------------*/ -- [mdw]