From 610096a965e792703ddacf5673a5f702c14825c8 Mon Sep 17 00:00:00 2001 From: Russell Sears Date: Wed, 13 Feb 2013 16:48:54 -0800 Subject: [PATCH] clean up headers to reduce warnings about _GNU_SOURCE --- benchmarks/lhtableThreaded.c | 8 ++------ config.h.cmake | 5 ++++- src/apps/referential/algebra.c | 2 +- src/apps/referential/dml.c | 2 +- src/apps/referential/lang/ast.c | 3 ++- src/apps/referential/toplevel.c | 3 ++- src/apps/referential/tuple.c | 4 +++- src/libdfa/libdfa.c | 3 ++- src/libdfa/messages.c | 3 +-- src/stasis/operations/linearHashNTA.c | 1 - test/cht/simple.c | 2 +- test/stasis/check_concurrentHash.c | 1 - test/stasis/check_lhtable.c | 1 - test/stasis/check_redblack.c | 1 - utilities/logfile_dump.c | 3 ++- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/benchmarks/lhtableThreaded.c b/benchmarks/lhtableThreaded.c index 55cb02a..73f9572 100644 --- a/benchmarks/lhtableThreaded.c +++ b/benchmarks/lhtableThreaded.c @@ -1,11 +1,7 @@ -#define _GNU_SOURCE +#include +#include #include -#include -#include -#include -#include #include -#include #include int entries; diff --git a/config.h.cmake b/config.h.cmake index 9346af3..d0ce7d6 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,3 +1,5 @@ +#ifndef STASIS_CONFIG_H +#define STASIS_CONFIG_H #define __USE_GNU #define _GNU_SOURCE #cmakedefine HAVE_POSIX_FALLOCATE @@ -15,4 +17,5 @@ #cmakedefine HAVE_POWL #cmakedefine DBUG #cmakedefine ON_LINUX -#cmakedefine ON_MACOS \ No newline at end of file +#cmakedefine ON_MACOS +#endif \ No newline at end of file diff --git a/src/apps/referential/algebra.c b/src/apps/referential/algebra.c index 16423cf..33bcc75 100644 --- a/src/apps/referential/algebra.c +++ b/src/apps/referential/algebra.c @@ -1,4 +1,4 @@ -#define _GNU_SOURCE +#include #include #include #include diff --git a/src/apps/referential/dml.c b/src/apps/referential/dml.c index ff05de9..d97a2c3 100644 --- a/src/apps/referential/dml.c +++ b/src/apps/referential/dml.c @@ -1,4 +1,4 @@ -#define _GNU_SOURCE +#define #include #include diff --git a/src/apps/referential/lang/ast.c b/src/apps/referential/lang/ast.c index 910c7fb..b5d4c2a 100644 --- a/src/apps/referential/lang/ast.c +++ b/src/apps/referential/lang/ast.c @@ -1,4 +1,5 @@ -#define _GNU_SOURCE +#include +#include #include #include diff --git a/src/apps/referential/toplevel.c b/src/apps/referential/toplevel.c index 09cf202..77629aa 100644 --- a/src/apps/referential/toplevel.c +++ b/src/apps/referential/toplevel.c @@ -1,4 +1,5 @@ -#define _GNU_SOURCE +#include +#include #include #include diff --git a/src/apps/referential/tuple.c b/src/apps/referential/tuple.c index ec7901f..39a08f3 100644 --- a/src/apps/referential/tuple.c +++ b/src/apps/referential/tuple.c @@ -1,4 +1,6 @@ -#define _GNU_SOURCE +#include +#include + #include #include #include diff --git a/src/libdfa/libdfa.c b/src/libdfa/libdfa.c index 11e4c6e..1f97ca4 100644 --- a/src/libdfa/libdfa.c +++ b/src/libdfa/libdfa.c @@ -39,7 +39,8 @@ authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. ---*/ -#define _GNU_SOURCE // For asprintf +#include +#include #include #include #include diff --git a/src/libdfa/messages.c b/src/libdfa/messages.c index b2b1e75..daf1d98 100644 --- a/src/libdfa/messages.c +++ b/src/libdfa/messages.c @@ -41,8 +41,7 @@ terms specified in this license. ---*/ /*#include */ -#define _GNU_SOURCE - +#include #include #include #include diff --git a/src/stasis/operations/linearHashNTA.c b/src/stasis/operations/linearHashNTA.c index b2f990b..ecfdbfa 100644 --- a/src/stasis/operations/linearHashNTA.c +++ b/src/stasis/operations/linearHashNTA.c @@ -1,5 +1,4 @@ #include -#define _GNU_SOURCE #include #include #include diff --git a/test/cht/simple.c b/test/cht/simple.c index 9d9add4..d19f28d 100644 --- a/test/cht/simple.c +++ b/test/cht/simple.c @@ -39,7 +39,7 @@ authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. ---*/ -#define _GNU_SOURCE +#include #include #include "../../src/apps/cht/cht.h" #include diff --git a/test/stasis/check_concurrentHash.c b/test/stasis/check_concurrentHash.c index 6143251..38faf05 100644 --- a/test/stasis/check_concurrentHash.c +++ b/test/stasis/check_concurrentHash.c @@ -46,7 +46,6 @@ permission to use and distribute the software in accordance with the terms specified in this license. ---*/ -#define _GNU_SOURCE #include "../check_includes.h" #include diff --git a/test/stasis/check_lhtable.c b/test/stasis/check_lhtable.c index 9093114..9963e82 100644 --- a/test/stasis/check_lhtable.c +++ b/test/stasis/check_lhtable.c @@ -40,7 +40,6 @@ permission to use and distribute the software in accordance with the terms specified in this license. ---*/ -#define _GNU_SOURCE #include "../check_includes.h" #include diff --git a/test/stasis/check_redblack.c b/test/stasis/check_redblack.c index f5ac361..23bc7e3 100644 --- a/test/stasis/check_redblack.c +++ b/test/stasis/check_redblack.c @@ -1,4 +1,3 @@ -#define _GNU_SOURCE #include "../check_includes.h" #undef STLSEARCH diff --git a/utilities/logfile_dump.c b/utilities/logfile_dump.c index 0566a2a..78c3a35 100644 --- a/utilities/logfile_dump.c +++ b/utilities/logfile_dump.c @@ -1,4 +1,5 @@ -#define _GNU_SOURCE +#include +#include #include #include #include