From 250223086c80c703356585601622fd9f3a1eff14 Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Thu, 21 Jan 2010 00:03:17 +0000 Subject: [PATCH] reordered includes for compatibility with gcc3 --- benchmarks/arrayListSet.c | 2 +- benchmarks/linearHashNTA.c | 2 +- benchmarks/linkedListNTA.c | 2 +- benchmarks/naiveHash.c | 2 +- benchmarks/naiveMultiThreaded.c | 2 +- benchmarks/pageOrientedListNTA.c | 2 +- benchmarks/rawSet.c | 2 +- benchmarks/sequentialThroughput.c | 2 +- benchmarks/slotted.c | 2 +- benchmarks/zeroCopy.c | 5 +++-- pbl/pbl.h | 1 + src/apps/readOnlyHash/buildTable.c | 5 +++-- src/apps/readOnlyHash/queryTable.c | 3 ++- src/pobj/pobj.c | 5 +++-- src/stasis/bufferPool.c | 4 ++-- src/stasis/operations/lsmTree.c | 4 +--- src/stasis/page/fixed.c | 4 +++- src/stasis/recovery2.c | 1 + stasis/common.h | 2 +- stasis/operations/lsmTree.h | 3 ++- stasis/rw.h | 10 ++++++---- stasis/transactional.h | 2 +- test/stasis/fault_injection/fitest.h | 2 +- 23 files changed, 39 insertions(+), 30 deletions(-) diff --git a/benchmarks/arrayListSet.c b/benchmarks/arrayListSet.c index fee1824..de71a19 100644 --- a/benchmarks/arrayListSet.c +++ b/benchmarks/arrayListSet.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include int main(int argc, char** argv) { diff --git a/benchmarks/linearHashNTA.c b/benchmarks/linearHashNTA.c index a324d47..07c6c6b 100644 --- a/benchmarks/linearHashNTA.c +++ b/benchmarks/linearHashNTA.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include diff --git a/benchmarks/linkedListNTA.c b/benchmarks/linkedListNTA.c index 9b98668..347b6d2 100644 --- a/benchmarks/linkedListNTA.c +++ b/benchmarks/linkedListNTA.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include diff --git a/benchmarks/naiveHash.c b/benchmarks/naiveHash.c index 643103f..13ee415 100644 --- a/benchmarks/naiveHash.c +++ b/benchmarks/naiveHash.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include int main(int argc, char** argv) { diff --git a/benchmarks/naiveMultiThreaded.c b/benchmarks/naiveMultiThreaded.c index 64d61b1..dc63ea6 100644 --- a/benchmarks/naiveMultiThreaded.c +++ b/benchmarks/naiveMultiThreaded.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include #include static pthread_mutex_t hash_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/benchmarks/pageOrientedListNTA.c b/benchmarks/pageOrientedListNTA.c index a1166e7..7e2ad56 100644 --- a/benchmarks/pageOrientedListNTA.c +++ b/benchmarks/pageOrientedListNTA.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include //#define CHECK_RESULTS 1 diff --git a/benchmarks/rawSet.c b/benchmarks/rawSet.c index 139c583..a6560af 100644 --- a/benchmarks/rawSet.c +++ b/benchmarks/rawSet.c @@ -1,7 +1,7 @@ +#include #include #include #include -#include #include int main(int argc, char** argv) { diff --git a/benchmarks/sequentialThroughput.c b/benchmarks/sequentialThroughput.c index 34a3703..b04876d 100644 --- a/benchmarks/sequentialThroughput.c +++ b/benchmarks/sequentialThroughput.c @@ -1,8 +1,8 @@ +#include #include #include #include -#include #include #include #include diff --git a/benchmarks/slotted.c b/benchmarks/slotted.c index 9e59566..ee7e389 100644 --- a/benchmarks/slotted.c +++ b/benchmarks/slotted.c @@ -4,12 +4,12 @@ * Created on: Jul 15, 2009 * Author: sears */ +#include #include #include #include #include -#include #include #include diff --git a/benchmarks/zeroCopy.c b/benchmarks/zeroCopy.c index 910db19..647ad9d 100644 --- a/benchmarks/zeroCopy.c +++ b/benchmarks/zeroCopy.c @@ -1,8 +1,9 @@ +#include +#include + #include #include #include -#include -#include #include #include diff --git a/pbl/pbl.h b/pbl/pbl.h index 2dd1eb9..bb74885 100644 --- a/pbl/pbl.h +++ b/pbl/pbl.h @@ -11,6 +11,7 @@ #define PBL_H #ifdef PBL_COMPAT +#include #include struct pblHashTable_t; diff --git a/src/apps/readOnlyHash/buildTable.c b/src/apps/readOnlyHash/buildTable.c index a9e9206..07dc288 100644 --- a/src/apps/readOnlyHash/buildTable.c +++ b/src/apps/readOnlyHash/buildTable.c @@ -1,10 +1,11 @@ +#include +#include + #include #include #include #include #include -#include -#include #include #include diff --git a/src/apps/readOnlyHash/queryTable.c b/src/apps/readOnlyHash/queryTable.c index 5782b40..54794ab 100644 --- a/src/apps/readOnlyHash/queryTable.c +++ b/src/apps/readOnlyHash/queryTable.c @@ -1,9 +1,10 @@ +#include + #include #include #include #include #include -#include int main(int argc, char** argv) { Tinit(); diff --git a/src/pobj/pobj.c b/src/pobj/pobj.c index 6d04a48..f8dd1d9 100644 --- a/src/pobj/pobj.c +++ b/src/pobj/pobj.c @@ -1,8 +1,9 @@ +#include +#include + #include #include #include -#include -#include #include "common.h" #include "debug.h" #include "hash.h" diff --git a/src/stasis/bufferPool.c b/src/stasis/bufferPool.c index 60c08dc..a9d6ae8 100644 --- a/src/stasis/bufferPool.c +++ b/src/stasis/bufferPool.c @@ -48,10 +48,10 @@ terms specified in this license. * $Id$ * */ -#include - +#include #include #include +#include struct stasis_buffer_pool_t { pageid_t nextPage; diff --git a/src/stasis/operations/lsmTree.c b/src/stasis/operations/lsmTree.c index 0d65884..530d83d 100644 --- a/src/stasis/operations/lsmTree.c +++ b/src/stasis/operations/lsmTree.c @@ -1,5 +1,3 @@ -#include - #include #include #include @@ -8,7 +6,7 @@ // XXX including fixed.h breaks page api encapsulation; we need a "last slot" // call. #include -#include +#include static lsm_comparator_t comparators[MAX_LSM_COMPARATORS]; static lsm_page_initializer_t initializers[MAX_LSM_PAGE_INITIALIZERS]; diff --git a/src/stasis/page/fixed.c b/src/stasis/page/fixed.c index dfc4285..95416f0 100644 --- a/src/stasis/page/fixed.c +++ b/src/stasis/page/fixed.c @@ -1,9 +1,11 @@ -#include +#include #include #include /** @todo should page implementations provide readLSN / writeLSN??? */ #include +#include + int stasis_fixed_records_per_page(size_t size) { diff --git a/src/stasis/recovery2.c b/src/stasis/recovery2.c index 9a0909b..e1c9954 100644 --- a/src/stasis/recovery2.c +++ b/src/stasis/recovery2.c @@ -5,6 +5,7 @@ Implements three phase recovery */ +#include #include #include diff --git a/stasis/common.h b/stasis/common.h index a372742..7c79078 100644 --- a/stasis/common.h +++ b/stasis/common.h @@ -60,7 +60,7 @@ terms specified in this license. #ifndef __stasis_common_h #define __stasis_common_h - +#define _XOPEN_SOURCE 600 #include // for size_t #ifdef __cplusplus diff --git a/stasis/operations/lsmTree.h b/stasis/operations/lsmTree.h index a2fd863..4472ba7 100644 --- a/stasis/operations/lsmTree.h +++ b/stasis/operations/lsmTree.h @@ -15,8 +15,9 @@ For now, LSM-trees only support fixed length keys; this restriction will be lifted in the future. */ -#include +#include #include +#include typedef struct { recordid treeRoot; recordid pos; diff --git a/stasis/rw.h b/stasis/rw.h index 2aabf9f..0ae5dab 100644 --- a/stasis/rw.h +++ b/stasis/rw.h @@ -15,14 +15,16 @@ * Found the code at this url: * http://www.cs.nmsu.edu/~jcook/Tools/pthreads/rw.c */ -#include -#include -#include - #ifndef __LIBDFA_RW_H #define __LIBDFA_RW_H +#include +#include +#include + BEGIN_C_DECLS + + #define HAVE_PTHREAD_RWLOCK #ifdef HAVE_PTHREAD_RWLOCK typedef pthread_rwlock_t rwl; diff --git a/stasis/transactional.h b/stasis/transactional.h index dbbefbd..b7d7a53 100644 --- a/stasis/transactional.h +++ b/stasis/transactional.h @@ -551,7 +551,7 @@ terms specified in this license. #ifndef __TRANSACTIONAL_H__ #define __TRANSACTIONAL_H__ -#include "common.h" +#include #include "flags.h" BEGIN_C_DECLS /** diff --git a/test/stasis/fault_injection/fitest.h b/test/stasis/fault_injection/fitest.h index 188a488..e4d1733 100644 --- a/test/stasis/fault_injection/fitest.h +++ b/test/stasis/fault_injection/fitest.h @@ -44,6 +44,7 @@ terms specified in this license. #ifndef FI_TEST_H #define FI_TEST_H +#include #include #include @@ -51,7 +52,6 @@ terms specified in this license. #include #include #include -#include #include #include #include