* libmd5/md5.hh,
* src/config.hh.in,
* test/fixtures/my_lib/lib.hh:
Here.
---
dynamic-use-of-static-c++/ChangeLog | 9 +++++++++
dynamic-use-of-static-c++/libmd5/md5.hh | 5 +++++
dynamic-use-of-static-c++/src/config.hh.in | 13 +++++++++----
.../test/fixtures/my_lib/lib.hh | 17 +++++++++++------
4 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/dynamic-use-of-static-c++/ChangeLog b/dynamic-use-of-static-c++/ChangeLog
index 410c942..f7e7988 100644
--- a/dynamic-use-of-static-c++/ChangeLog
+++ b/dynamic-use-of-static-c++/ChangeLog
@@ -1,5 +1,14 @@
2009-11-03 Roland Levillain <roland(a)lrde.epita.fr>
+ Add missing header guards.
+
+ * libmd5/md5.hh,
+ * src/config.hh.in,
+ * test/fixtures/my_lib/lib.hh:
+ Here.
+
+2009-11-03 Roland Levillain <roland(a)lrde.epita.fr>
+
* README: Update.
2009-11-03 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/dynamic-use-of-static-c++/libmd5/md5.hh
b/dynamic-use-of-static-c++/libmd5/md5.hh
index 5c72059..d348342 100644
--- a/dynamic-use-of-static-c++/libmd5/md5.hh
+++ b/dynamic-use-of-static-c++/libmd5/md5.hh
@@ -39,6 +39,9 @@ documentation and/or software.
*/
+#ifndef MD5_HH
+# define MD5_HH
+
#include <cstdio>
#include <fstream>
#include <iostream>
@@ -107,3 +110,5 @@ private:
uint4 s, uint4 ac);
};
+
+#endif // ! MD5_HH
diff --git a/dynamic-use-of-static-c++/src/config.hh.in
b/dynamic-use-of-static-c++/src/config.hh.in
index 0ce13fc..1939af5 100644
--- a/dynamic-use-of-static-c++/src/config.hh.in
+++ b/dynamic-use-of-static-c++/src/config.hh.in
@@ -25,7 +25,12 @@
exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
-#define DYNDIR "@DYNDIR@"
-#define DYN_DATADIR "@DYN_DATADIR@"
-#define DYN_FIXTURES "@DYN_FIXTURES@"
-#define MILENA_DIR "@MILENA_DIR@"
+#ifndef DYN_CONFIG_HH
+# define DYN_CONFIG_HH
+
+# define DYNDIR "@DYNDIR@"
+# define DYN_DATADIR "@DYN_DATADIR@"
+# define DYN_FIXTURES "@DYN_FIXTURES@"
+# define MILENA_DIR "@MILENA_DIR@"
+
+#endif // ! DYN_CONFIG_HH
diff --git a/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
b/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
index a03fc22..e3a42c7 100644
--- a/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
+++ b/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
@@ -25,10 +25,13 @@
// part of generic lib
-#include <cmath>
-#include <iostream>
-#include <sstream> // Warning does not work without me
-#include <vector>
+#ifndef MY_LIB_LIB_HH
+# define MY_LIB_LIB_HH
+
+# include <cmath>
+# include <iostream>
+# include <sstream> // Warning does not work without me
+# include <vector>
template <class T>
struct u
@@ -126,8 +129,10 @@ namespace my_lib
std::ostream& ostr_;
};
-#define stl_each(c, i) for (i = c.begin(); i != c.end(); ++i)
+# define stl_each(c, i) for (i = c.begin(); i != c.end(); ++i)
-#define echo(i) std::cout << i << std::endl
+# define echo(i) std::cout << i << std::endl
} // end of my_lib
+
+#endif // ! MY_LIB_LIB_HH
--
1.6.5
Show replies by date