From de8bf53e984a2ebf820dc3ecd8c66189fb9c4e1a Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Tue, 22 Feb 2011 19:12:38 +0000 Subject: [PATCH] fix some header #include problems --- config.h.cmake | 7 ++++--- src/stasis/blobManager.c | 1 + src/stasis/graph.c | 1 + src/stasis/io/file.c | 2 +- src/stasis/logger/filePool.c | 5 ++--- src/stasis/page/slotted.c | 1 + stasis/common.h | 6 ++++-- test/check_includes.h | 3 +-- test/stasis/check_allocationPolicy.c | 1 - 9 files changed, 15 insertions(+), 12 deletions(-) diff --git a/config.h.cmake b/config.h.cmake index f1db17d..bae946a 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,3 +1,4 @@ +#define __USE_GNU #define _GNU_SOURCE #cmakedefine HAVE_FDATASYNC #cmakedefine HAVE_SYNC_FILE_RANGE @@ -8,6 +9,6 @@ #cmakedefine HAVE_TDESTROY #cmakedefine HAVE_POWL #cmakedefine DBUG_TEST -#ifndef HAVE_PTHREAD_STACK_MIN -#define PTHREAD_STACK_MIN 32768 // wild guess. -#endif +//#ifndef HAVE_PTHREAD_STACK_MIN +//#define PTHREAD_STACK_MIN 32768 // wild guess. +//#endif diff --git a/src/stasis/blobManager.c b/src/stasis/blobManager.c index 8cedf20..76ad21d 100644 --- a/src/stasis/blobManager.c +++ b/src/stasis/blobManager.c @@ -1,4 +1,5 @@ #include +#include #ifdef HAVE_ALLOCA_H #include #endif diff --git a/src/stasis/graph.c b/src/stasis/graph.c index 78e5dee..0da5aa9 100644 --- a/src/stasis/graph.c +++ b/src/stasis/graph.c @@ -1,4 +1,5 @@ #include +#include #ifdef HAVE_ALLOCA_H #include #endif diff --git a/src/stasis/io/file.c b/src/stasis/io/file.c index e1b6e0c..fafb322 100644 --- a/src/stasis/io/file.c +++ b/src/stasis/io/file.c @@ -1,6 +1,6 @@ #include -#include #include +#include #include #include diff --git a/src/stasis/logger/filePool.c b/src/stasis/logger/filePool.c index 874360e..50a653f 100644 --- a/src/stasis/logger/filePool.c +++ b/src/stasis/logger/filePool.c @@ -1,10 +1,9 @@ -#define _SVID_SOURCE -#define _BSD_SOURCE +#include +#include #include #include #include -#include #include #include diff --git a/src/stasis/page/slotted.c b/src/stasis/page/slotted.c index edc3668..24aacea 100644 --- a/src/stasis/page/slotted.c +++ b/src/stasis/page/slotted.c @@ -1,4 +1,5 @@ #include +#include #ifdef HAVE_ALLOCA_H #include #endif diff --git a/stasis/common.h b/stasis/common.h index 794a1eb..3c393ac 100644 --- a/stasis/common.h +++ b/stasis/common.h @@ -63,6 +63,8 @@ terms specified in this license. #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 #endif +#include // uint32, et. al. (has to be before sys/types.h for mcpp atop some broken gcc headers) +#include #include // for size_t #ifdef __cplusplus @@ -73,8 +75,6 @@ terms specified in this license. # define END_C_DECLS #endif /* __cplusplus */ -#include // uint32, et. al. - #include //#if STDC_HEADERS @@ -164,6 +164,8 @@ typedef struct { */ typedef struct Page_s Page; +extern long long *stasis_dbug_timestamp; + #define STLSEARCH #include "compensations.h" diff --git a/test/check_includes.h b/test/check_includes.h index 5f5613f..48e3119 100644 --- a/test/check_includes.h +++ b/test/check_includes.h @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -6,8 +7,6 @@ #include "check_impl.h" -#include - uint64_t myrandom(uint64_t x) { double xx = x; double r = random(); diff --git a/test/stasis/check_allocationPolicy.c b/test/stasis/check_allocationPolicy.c index a8e8ea1..7142350 100644 --- a/test/stasis/check_allocationPolicy.c +++ b/test/stasis/check_allocationPolicy.c @@ -43,7 +43,6 @@ terms specified in this license. #include "../check_includes.h" #include -#include #include #include