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 | |
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')
40 files changed, 0 insertions, 198 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index f478fea4daa..4d0a5627381 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -15,11 +15,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "afr.h" #include "dict.h" diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 984ed9c6095..1237b261b14 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -17,11 +17,6 @@ #include <signal.h> #include <string.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "dict.h" #include "xlator.h" diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 8a2c0e46e40..05b4cc02923 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -16,11 +16,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "afr.h" #include "dict.h" diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 7fed62a5361..9cb6d2fca6b 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -16,11 +16,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "afr.h" #include "dict.h" diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 3db4010e997..931785c2c5b 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -16,11 +16,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "afr.h" #include "dict.h" diff --git a/xlators/cluster/afr/src/afr-messages.h b/xlators/cluster/afr/src/afr-messages.h index 52bdead934b..b7e761bedf5 100644 --- a/xlators/cluster/afr/src/afr-messages.h +++ b/xlators/cluster/afr/src/afr-messages.h @@ -11,11 +11,6 @@ #ifndef _AFR_MESSAGES_H_ #define _AFR_MESSAGES_H_ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glfs-message-id.h" /*! \file afr-messages.h diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index f1da8b05201..ebfadf40e5c 100644 --- a/xlators/cluster/afr/src/afr-open.c +++ b/xlators/cluster/afr/src/afr-open.c @@ -15,11 +15,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "glusterfs.h" #include "afr.h" #include "dict.h" diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index f3d1f8b0b14..c1b116ed9c8 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" #include "byte-order.h" diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 7567fe9f851..f5664f08a25 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" #include "byte-order.h" diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index cb3648c07bd..4c092f19a79 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" #include "byte-order.h" diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index 11c0c9c8cd9..ea38d037817 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" #include "byte-order.h" diff --git a/xlators/cluster/afr/src/afr-self-heal-name.c b/xlators/cluster/afr/src/afr-self-heal-name.c index ba9c3eeb6ea..a45a763a2fa 100644 --- a/xlators/cluster/afr/src/afr-self-heal-name.c +++ b/xlators/cluster/afr/src/afr-self-heal-name.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c index fe9367597a2..cdcef2d54ed 100644 --- a/xlators/cluster/afr/src/afr-self-heald.c +++ b/xlators/cluster/afr/src/afr-self-heald.c @@ -9,11 +9,6 @@ */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr.h" #include "afr-self-heal.h" #include "afr-self-heald.h" diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 26efe93de99..7af5f217a20 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -15,10 +15,6 @@ #include <stdlib.h> #include <signal.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif #include "afr-common.c" struct volume_options options[]; diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 855d3a3680e..3d28ac22ab1 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -12,11 +12,6 @@ #ifndef __AFR_H__ #define __AFR_H__ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "call-stub.h" #include "compat-errno.h" #include "afr-mem-types.h" diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index ff8f5866f10..21855723d52 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -13,11 +13,6 @@ #include <stdlib.h> #include <fnmatch.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "afr-common.c" #include "defaults.c" #include "glusterfs.h" 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" diff --git a/xlators/cluster/ha/src/ha.c b/xlators/cluster/ha/src/ha.c index 742ec46f107..6071eab55ee 100644 --- a/xlators/cluster/ha/src/ha.c +++ b/xlators/cluster/ha/src/ha.c @@ -11,11 +11,6 @@ * can be written to decide what error to be returned and when */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "xlator.h" #include "call-stub.h" #include "defaults.h" diff --git a/xlators/cluster/map/src/map-helper.c b/xlators/cluster/map/src/map-helper.c index 851397b68d3..c5f828ae6d1 100644 --- a/xlators/cluster/map/src/map-helper.c +++ b/xlators/cluster/map/src/map-helper.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 "xlator.h" #include "map.h" diff --git a/xlators/cluster/map/src/map.c b/xlators/cluster/map/src/map.c index aa2b23c29f1..fbb56dbc554 100644 --- a/xlators/cluster/map/src/map.c +++ b/xlators/cluster/map/src/map.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 "xlator.h" #include "map.h" diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h index 150d9e49f93..1e2fcb4e659 100644 --- a/xlators/cluster/stripe/src/stripe.h +++ b/xlators/cluster/stripe/src/stripe.h @@ -12,11 +12,6 @@ #ifndef _STRIPE_H_ #define _STRIPE_H_ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "xlator.h" #include "logging.h" #include "defaults.h" |