diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-05-18 16:26:02 +0200 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-05-29 05:43:17 -0700 |
commit | 8a9328e37b8c63d60583184dc8dab12f85810682 (patch) | |
tree | 0fa017379bf5e9dfaa2e6d8132c73cc1090a3d52 /xlators/cluster/dht/src | |
parent | 5d912230a7d4f9979c10ff15da724624bd8e069d (diff) |
build: do not #include "config.h" in each file
Instead of including config.h in each file, and have the additional
config.h included from the compiler commandline (-include option).
When a .c file tests for a certain #define, and config.h was not
included, incorrect assumtions were made. With this change, it can not
happen again.
BUG: 1222319
Change-Id: I4f9097b8740b81ecfe8b218d52ca50361f74cb64
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10808
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-diskusage.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-hashfn.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-inode-read.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-inode-write.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-layout.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-messages.h | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-rename.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-shared.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/nufa.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/switch.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/tier.h | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/unittest/dht_layout_mock.c | 5 |
20 files changed, 0 insertions, 99 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 3a1a9422d46..d42ef867e2b 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - /* TODO: add NS locking */ #include "glusterfs.h" diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index 5eb65bf0397..96f99141a59 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include <regex.h> #include <signal.h> diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c index 621c613d08c..83efdf1f0a8 100644 --- a/xlators/cluster/dht/src/dht-diskusage.c +++ b/xlators/cluster/dht/src/dht-diskusage.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - /* TODO: add NS locking */ #include "glusterfs.h" diff --git a/xlators/cluster/dht/src/dht-hashfn.c b/xlators/cluster/dht/src/dht-hashfn.c index 72b3df022da..478d6cea2f5 100644 --- a/xlators/cluster/dht/src/dht-hashfn.c +++ b/xlators/cluster/dht/src/dht-hashfn.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 2f85066569d..19bea0a0ae2 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" diff --git a/xlators/cluster/dht/src/dht-inode-read.c b/xlators/cluster/dht/src/dht-inode-read.c index 78e3ef4233b..896997e67f7 100644 --- a/xlators/cluster/dht/src/dht-inode-read.c +++ b/xlators/cluster/dht/src/dht-inode-read.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "dht-common.h" int dht_access2 (xlator_t *this, call_frame_t *frame, int ret); diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index 7d04376abfc..f4560da5ca9 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "dht-common.h" int dht_writev2 (xlator_t *this, call_frame_t *frame, int ret); diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index da8f13fc428..103a7f8d637 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index 14df3187097..dc995ff31d1 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" diff --git a/xlators/cluster/dht/src/dht-messages.h b/xlators/cluster/dht/src/dht-messages.h index eb4c356e3c2..28cfe77d916 100644 --- a/xlators/cluster/dht/src/dht-messages.h +++ b/xlators/cluster/dht/src/dht-messages.h @@ -10,11 +10,6 @@ #ifndef _DHT_MESSAGES_H_ #define _DHT_MESSAGES_H_ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glfs-message-id.h" /*! \file dht-messages.h diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 3ab73d4ef5b..92ebd02f995 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "dht-common.h" #include "xlator.h" #include <signal.h> diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c index 4e4e9869685..f3344c8c976 100644 --- a/xlators/cluster/dht/src/dht-rename.c +++ b/xlators/cluster/dht/src/dht-rename.c @@ -11,11 +11,6 @@ /* TODO: link(oldpath, newpath) fails if newpath already exists. DHT should * delete the newpath if it gets EEXISTS from link() call. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" #include "dht-common.h" diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index c881a361804..6d3d20823cd 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c index 2fef13adbd1..8a15fb2a2b9 100644 --- a/xlators/cluster/dht/src/dht-shared.c +++ b/xlators/cluster/dht/src/dht-shared.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - /* TODO: add NS locking */ #include "statedump.h" #include "dht-common.h" diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 3934df5ec64..e1e09d12a42 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "statedump.h" #include "dht-common.h" diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c index 72d6d9c10e5..43519d97542 100644 --- a/xlators/cluster/dht/src/nufa.c +++ b/xlators/cluster/dht/src/nufa.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "dht-common.h" /* TODO: all 'TODO's in dht.c holds good */ diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c index 0071dfa265d..c86a0a9b75b 100644 --- a/xlators/cluster/dht/src/switch.c +++ b/xlators/cluster/dht/src/switch.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "dht-common.h" #include "dht-mem-types.h" diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index b575da0b8f0..39f9ba58988 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -8,10 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif #include <dlfcn.h> #include "dht-common.h" diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h index 7d4ea6b7ebe..246ef2af0be 100644 --- a/xlators/cluster/dht/src/tier.h +++ b/xlators/cluster/dht/src/tier.h @@ -11,11 +11,6 @@ #ifndef _TIER_H_ #define _TIER_H_ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - /******************************************************************************/ /* This is from dht-rebalancer.c as we dont have dht-rebalancer.h */ diff --git a/xlators/cluster/dht/src/unittest/dht_layout_mock.c b/xlators/cluster/dht/src/unittest/dht_layout_mock.c index faf871d49be..6544f4208f5 100644 --- a/xlators/cluster/dht/src/unittest/dht_layout_mock.c +++ b/xlators/cluster/dht/src/unittest/dht_layout_mock.c @@ -7,11 +7,6 @@ later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "xlator.h" #include "dht-common.h" |