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 /cli/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 'cli/src')
-rw-r--r-- | cli/src/cli-cmd-global.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-misc.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-parser.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-peer.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-snapshot.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-system.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd.c | 5 | ||||
-rw-r--r-- | cli/src/cli-cmd.h | 5 | ||||
-rw-r--r-- | cli/src/cli-quotad-client.c | 5 | ||||
-rw-r--r-- | cli/src/cli-rl.c | 5 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 5 | ||||
-rw-r--r-- | cli/src/cli.c | 5 | ||||
-rw-r--r-- | cli/src/cli.h | 5 | ||||
-rw-r--r-- | cli/src/input.c | 5 | ||||
-rw-r--r-- | cli/src/registry.c | 5 |
16 files changed, 0 insertions, 80 deletions
diff --git a/cli/src/cli-cmd-global.c b/cli/src/cli-cmd-global.c index 9b71821b00c..3c526f8a828 100644 --- a/cli/src/cli-cmd-global.c +++ b/cli/src/cli-cmd-global.c @@ -19,11 +19,6 @@ #include <sys/wait.h> #include <netinet/in.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd-misc.c b/cli/src/cli-cmd-misc.c index ccfeb6d87f1..9f8c159f073 100644 --- a/cli/src/cli-cmd-misc.c +++ b/cli/src/cli-cmd-misc.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 2390822e5df..03b5d938d90 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c index 551312411a0..1fe84b3ebc3 100644 --- a/cli/src/cli-cmd-peer.c +++ b/cli/src/cli-cmd-peer.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd-snapshot.c b/cli/src/cli-cmd-snapshot.c index 2716dd094af..80ab2b0f211 100644 --- a/cli/src/cli-cmd-snapshot.c +++ b/cli/src/cli-cmd-snapshot.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c index 690a104183a..d71f622ba11 100644 --- a/cli/src/cli-cmd-system.c +++ b/cli/src/cli-cmd-system.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index da6603cc1f6..3ce88394925 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -19,11 +19,6 @@ #include <sys/wait.h> #include <netinet/in.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index 5ea1edc9cac..99448fcae56 100644 --- a/cli/src/cli-cmd.c +++ b/cli/src/cli-cmd.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-cmd.h b/cli/src/cli-cmd.h index 94fa3e9c671..9a4426a3a7d 100644 --- a/cli/src/cli-cmd.h +++ b/cli/src/cli-cmd.h @@ -10,11 +10,6 @@ #ifndef __CLI_CMD_H__ #define __CLI_CMD_H__ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include <netdb.h> #include "cli.h" diff --git a/cli/src/cli-quotad-client.c b/cli/src/cli-quotad-client.c index 7c1651936c7..d00dfac6e60 100644 --- a/cli/src/cli-quotad-client.c +++ b/cli/src/cli-quotad-client.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 "cli-quotad-client.h" diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index ade1c8ebb37..bca37d9c509 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-cmd.h" #include "cli-mem-types.h" diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 290028f6510..8aca451fece 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - /* Widths of various columns in top read/write-perf output * Total width of top read/write-perf should be 80 chars * including one space between column diff --git a/cli/src/cli.c b/cli/src/cli.c index 525ec4bab72..4f4813bae76 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -29,11 +29,6 @@ #include <semaphore.h> #include <errno.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #ifdef HAVE_MALLOC_H #include <malloc.h> #endif diff --git a/cli/src/cli.h b/cli/src/cli.h index c9283b5b875..be9fd961804 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -10,11 +10,6 @@ #ifndef __CLI_H__ #define __CLI_H__ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "rpc-clnt.h" #include "glusterfs.h" #include "protocol-common.h" diff --git a/cli/src/input.c b/cli/src/input.c index 26f337c3c27..10fc39cd6b4 100644 --- a/cli/src/input.c +++ b/cli/src/input.c @@ -13,11 +13,6 @@ #include <stdint.h> #include <pthread.h> -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include "cli.h" #include "cli-mem-types.h" diff --git a/cli/src/registry.c b/cli/src/registry.c index c4abe3be0b0..1adf7d6e572 100644 --- a/cli/src/registry.c +++ b/cli/src/registry.c @@ -8,11 +8,6 @@ cases as published by the Free Software Foundation. */ -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - #include <stdio.h> #include <string.h> #include <stdlib.h> |