summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-05-18 16:26:02 +0200
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-05-29 05:43:17 -0700
commit8a9328e37b8c63d60583184dc8dab12f85810682 (patch)
tree0fa017379bf5e9dfaa2e6d8132c73cc1090a3d52 /rpc
parent5d912230a7d4f9979c10ff15da724624bd8e069d (diff)
downloadglusterfs-8a9328e37b8c63d60583184dc8dab12f85810682.tar.gz
glusterfs-8a9328e37b8c63d60583184dc8dab12f85810682.tar.xz
glusterfs-8a9328e37b8c63d60583184dc8dab12f85810682.zip
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 'rpc')
-rw-r--r--rpc/rpc-lib/src/auth-glusterfs.c5
-rw-r--r--rpc/rpc-lib/src/auth-null.c5
-rw-r--r--rpc/rpc-lib/src/auth-unix.c5
-rw-r--r--rpc/rpc-lib/src/rpc-clnt-ping.c5
-rw-r--r--rpc/rpc-lib/src/rpc-clnt-ping.h5
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c5
-rw-r--r--rpc/rpc-lib/src/rpc-drc.c5
-rw-r--r--rpc/rpc-lib/src/rpc-drc.h5
-rw-r--r--rpc/rpc-lib/src/rpc-lib-messages.h5
-rw-r--r--rpc/rpc-lib/src/rpc-transport.c5
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h5
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c5
-rw-r--r--rpc/rpc-lib/src/rpcsvc.h5
-rw-r--r--rpc/rpc-lib/src/xdr-common.h5
-rw-r--r--rpc/rpc-lib/src/xdr-rpc.c5
-rw-r--r--rpc/rpc-lib/src/xdr-rpc.h5
-rw-r--r--rpc/rpc-lib/src/xdr-rpcclnt.c5
-rw-r--r--rpc/rpc-lib/src/xdr-rpcclnt.h5
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c5
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.h5
-rw-r--r--rpc/rpc-transport/rdma/src/rpc-trans-rdma-messages.h5
-rw-r--r--rpc/rpc-transport/socket/src/socket.c5
-rw-r--r--rpc/rpc-transport/socket/src/socket.h5
-rw-r--r--rpc/xdr/src/msg-nfs3.c5
-rw-r--r--rpc/xdr/src/msg-nfs3.h5
25 files changed, 0 insertions, 125 deletions
diff --git a/rpc/rpc-lib/src/auth-glusterfs.c b/rpc/rpc-lib/src/auth-glusterfs.c
index c3fc166b73..5670b8e840 100644
--- a/rpc/rpc-lib/src/auth-glusterfs.c
+++ b/rpc/rpc-lib/src/auth-glusterfs.c
@@ -10,11 +10,6 @@
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc.h"
#include "list.h"
#include "dict.h"
diff --git a/rpc/rpc-lib/src/auth-null.c b/rpc/rpc-lib/src/auth-null.c
index b030341abb..774fdc8da3 100644
--- a/rpc/rpc-lib/src/auth-null.c
+++ b/rpc/rpc-lib/src/auth-null.c
@@ -9,11 +9,6 @@
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc.h"
#include "list.h"
#include "dict.h"
diff --git a/rpc/rpc-lib/src/auth-unix.c b/rpc/rpc-lib/src/auth-unix.c
index 27351f6691..74ebfe0d1f 100644
--- a/rpc/rpc-lib/src/auth-unix.c
+++ b/rpc/rpc-lib/src/auth-unix.c
@@ -10,11 +10,6 @@
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc.h"
#include "list.h"
#include "dict.h"
diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.c b/rpc/rpc-lib/src/rpc-clnt-ping.c
index 17f8874a6a..0429bd3112 100644
--- a/rpc/rpc-lib/src/rpc-clnt-ping.c
+++ b/rpc/rpc-lib/src/rpc-clnt-ping.c
@@ -9,11 +9,6 @@
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpc-clnt.h"
#include "rpc-clnt-ping.h"
#include "byte-order.h"
diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.h b/rpc/rpc-lib/src/rpc-clnt-ping.h
index d7cd1d965e..bf97c0690d 100644
--- a/rpc/rpc-lib/src/rpc-clnt-ping.h
+++ b/rpc/rpc-lib/src/rpc-clnt-ping.h
@@ -9,11 +9,6 @@
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#define RPC_DEFAULT_PING_TIMEOUT 30
void
rpc_clnt_check_and_start_ping (struct rpc_clnt *rpc_ptr);
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index db99484cb8..ebcfec73ce 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -9,11 +9,6 @@
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#define RPC_CLNT_DEFAULT_REQUEST_COUNT 512
#include "rpc-clnt.h"
diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c
index 036b215e0c..fb7d2f1360 100644
--- a/rpc/rpc-lib/src/rpc-drc.c
+++ b/rpc/rpc-lib/src/rpc-drc.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc.h"
#ifndef RPC_DRC_H
#include "rpc-drc.h"
diff --git a/rpc/rpc-lib/src/rpc-drc.h b/rpc/rpc-lib/src/rpc-drc.h
index c42c2a2c2f..cd9e2c73d3 100644
--- a/rpc/rpc-lib/src/rpc-drc.h
+++ b/rpc/rpc-lib/src/rpc-drc.h
@@ -11,11 +11,6 @@
#ifndef RPC_DRC_H
#define RPC_DRC_H
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc-common.h"
#include "rpcsvc.h"
#include "locking.h"
diff --git a/rpc/rpc-lib/src/rpc-lib-messages.h b/rpc/rpc-lib/src/rpc-lib-messages.h
index 51351e8228..7046e42d54 100644
--- a/rpc/rpc-lib/src/rpc-lib-messages.h
+++ b/rpc/rpc-lib/src/rpc-lib-messages.h
@@ -11,11 +11,6 @@
#ifndef _RPC_LIB_MESSAGES_H_
#define _RPC_LIB_MESSAGES_H_
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "glfs-message-id.h"
/* NOTE: Rules for message additions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index 23fbf37360..149a831951 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -15,11 +15,6 @@
#include <fnmatch.h>
#include <stdint.h>
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "logging.h"
#include "rpc-transport.h"
#include "glusterfs.h"
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index d0572a1633..df0bab5dc4 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -11,11 +11,6 @@
#ifndef __RPC_TRANSPORT_H__
#define __RPC_TRANSPORT_H__
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include <inttypes.h>
#ifdef GF_SOLARIS_HOST_OS
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index be95d25b1b..d151d541ce 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "rpcsvc.h"
#include "rpc-transport.h"
#include "dict.h"
diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h
index 027e2ca1ff..02e467e68a 100644
--- a/rpc/rpc-lib/src/rpcsvc.h
+++ b/rpc/rpc-lib/src/rpcsvc.h
@@ -11,11 +11,6 @@
#ifndef _RPCSVC_H
#define _RPCSVC_H
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "event.h"
#include "rpc-transport.h"
#include "logging.h"
diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index 39b8f240a1..596ac99640 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -11,11 +11,6 @@
#ifndef _XDR_COMMON_H_
#define _XDR_COMMON_H_
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include <rpc/types.h>
#include <sys/types.h>
#include <rpc/xdr.h>
diff --git a/rpc/rpc-lib/src/xdr-rpc.c b/rpc/rpc-lib/src/xdr-rpc.c
index d016668b9a..88a7637b88 100644
--- a/rpc/rpc-lib/src/xdr-rpc.c
+++ b/rpc/rpc-lib/src/xdr-rpc.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
diff --git a/rpc/rpc-lib/src/xdr-rpc.h b/rpc/rpc-lib/src/xdr-rpc.h
index 4663ef7966..82e3f5baac 100644
--- a/rpc/rpc-lib/src/xdr-rpc.h
+++ b/rpc/rpc-lib/src/xdr-rpc.h
@@ -11,11 +11,6 @@
#ifndef _XDR_RPC_H_
#define _XDR_RPC_H_
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#ifndef GF_SOLARIS_HOST_OS
#include <rpc/rpc.h>
#endif
diff --git a/rpc/rpc-lib/src/xdr-rpcclnt.c b/rpc/rpc-lib/src/xdr-rpcclnt.c
index 810d1961b9..4a6d2ea913 100644
--- a/rpc/rpc-lib/src/xdr-rpcclnt.c
+++ b/rpc/rpc-lib/src/xdr-rpcclnt.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
diff --git a/rpc/rpc-lib/src/xdr-rpcclnt.h b/rpc/rpc-lib/src/xdr-rpcclnt.h
index c08d872f8c..e8d615a872 100644
--- a/rpc/rpc-lib/src/xdr-rpcclnt.h
+++ b/rpc/rpc-lib/src/xdr-rpcclnt.h
@@ -11,11 +11,6 @@
#ifndef _XDR_RPCCLNT_H
#define _XDR_RPCCLNT_H
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
//#include <rpc/rpc.h>
//#include <rpc/pmap_clnt.h>
#include <arpa/inet.h>
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 89fb6cb17d..7d665d34d5 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "dict.h"
#include "glusterfs.h"
#include "iobuf.h"
diff --git a/rpc/rpc-transport/rdma/src/rdma.h b/rpc/rpc-transport/rdma/src/rdma.h
index cf4536dc9b..449861f075 100644
--- a/rpc/rpc-transport/rdma/src/rdma.h
+++ b/rpc/rpc-transport/rdma/src/rdma.h
@@ -12,11 +12,6 @@
#define _XPORT_RDMA_H
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#ifndef MAX_IOVEC
#define MAX_IOVEC 16
#endif /* MAX_IOVEC */
diff --git a/rpc/rpc-transport/rdma/src/rpc-trans-rdma-messages.h b/rpc/rpc-transport/rdma/src/rpc-trans-rdma-messages.h
index 0957de25bb..616b0a20f6 100644
--- a/rpc/rpc-transport/rdma/src/rpc-trans-rdma-messages.h
+++ b/rpc/rpc-transport/rdma/src/rpc-trans-rdma-messages.h
@@ -11,11 +11,6 @@
#ifndef _RPC_TRANS_RDMA_MESSAGES_H_
#define _RPC_TRANS_RDMA_MESSAGES_H_
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "glfs-message-id.h"
/* NOTE: Rules for message additions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 82a84dd5fc..ece2bc8379 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -9,11 +9,6 @@
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "socket.h"
#include "name.h"
#include "dict.h"
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h
index 2a84e264b8..e30d2ece99 100644
--- a/rpc/rpc-transport/socket/src/socket.h
+++ b/rpc/rpc-transport/socket/src/socket.h
@@ -14,11 +14,6 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "event.h"
#include "rpc-transport.h"
#include "logging.h"
diff --git a/rpc/xdr/src/msg-nfs3.c b/rpc/xdr/src/msg-nfs3.c
index 6cdb5d37ea..040aced6a9 100644
--- a/rpc/xdr/src/msg-nfs3.c
+++ b/rpc/xdr/src/msg-nfs3.c
@@ -8,11 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include <sys/uio.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
diff --git a/rpc/xdr/src/msg-nfs3.h b/rpc/xdr/src/msg-nfs3.h
index b8e2c96945..628daea554 100644
--- a/rpc/xdr/src/msg-nfs3.h
+++ b/rpc/xdr/src/msg-nfs3.h
@@ -11,11 +11,6 @@
#ifndef _MSG_NFS3_H_
#define _MSG_NFS3_H_
-#ifndef _CONFIG_H
-#define _CONFIG_H
-#include "config.h"
-#endif
-
#include "xdr-nfs3.h"
#include "nlm4-xdr.h"
#include "acl3-xdr.h"