summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2012-05-15 18:00:51 -0600
committerMichael Steinert <mike.steinert@gmail.com>2012-05-17 11:44:45 -0600
commitc4dbaf19e2fef30333948c52273d62334c817119 (patch)
tree0a3fcc285bea65e5fc5ea32b159ddcb3e66f3b6d
parent02dce3750d29c5a7e682c6412e118dddc70c16f7 (diff)
downloadrabbitmq-c-github-ask-c4dbaf19e2fef30333948c52273d62334c817119.tar.gz
Add config.h header guards
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
-rw-r--r--librabbitmq/CMakeLists.txt5
-rw-r--r--librabbitmq/amqp_api.c2
-rw-r--r--librabbitmq/amqp_connection.c4
-rw-r--r--librabbitmq/amqp_mem.c5
-rw-r--r--librabbitmq/amqp_socket.c4
-rw-r--r--librabbitmq/amqp_table.c4
-rw-r--r--librabbitmq/amqp_url.c4
-rw-r--r--librabbitmq/unix/socket.c2
-rw-r--r--librabbitmq/windows/socket.c2
-rw-r--r--tools/common.c2
-rw-r--r--tools/consume.c2
-rw-r--r--tools/declare_queue.c2
-rw-r--r--tools/delete_queue.c2
-rw-r--r--tools/get.c2
-rw-r--r--tools/publish.c2
-rw-r--r--tools/unix/process.c4
-rw-r--r--tools/windows/compat.c4
-rw-r--r--tools/windows/process.c4
18 files changed, 54 insertions, 2 deletions
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index 7b1322d..4364cfb 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -68,7 +68,10 @@ set(LIBRABBITMQ_INCLUDE_DIRS
${LIBRABBITMQ_INCLUDE_DIRS}
PARENT_SCOPE)
-add_definitions(-DBUILDING_LIBRABBITMQ)
+add_definitions(
+ -DBUILDING_LIBRABBITMQ
+ -DHAVE_CONFIG_H
+ )
set(RABBITMQ_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/amqp_framing.h
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index 621e71b..4e0bb3e 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdlib.h>
#include <stdio.h>
diff --git a/librabbitmq/amqp_connection.c b/librabbitmq/amqp_connection.c
index fc99862..35d1e15 100644
--- a/librabbitmq/amqp_connection.c
+++ b/librabbitmq/amqp_connection.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/librabbitmq/amqp_mem.c b/librabbitmq/amqp_mem.c
index 429d423..ac87bb5 100644
--- a/librabbitmq/amqp_mem.c
+++ b/librabbitmq/amqp_mem.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -38,7 +42,6 @@
#include <assert.h>
#include "amqp.h"
-#include "config.h"
char const *amqp_version(void) {
return VERSION; /* defined in config.h */
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c
index d7c523e..157aec8 100644
--- a/librabbitmq/amqp_socket.c
+++ b/librabbitmq/amqp_socket.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/librabbitmq/amqp_table.c b/librabbitmq/amqp_table.c
index 3f78a5b..b3b33f3 100644
--- a/librabbitmq/amqp_table.c
+++ b/librabbitmq/amqp_table.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/librabbitmq/amqp_url.c b/librabbitmq/amqp_url.c
index 476d5dc..28264d8 100644
--- a/librabbitmq/amqp_url.c
+++ b/librabbitmq/amqp_url.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/librabbitmq/unix/socket.c b/librabbitmq/unix/socket.c
index 5d339e6..d0e2400 100644
--- a/librabbitmq/unix/socket.c
+++ b/librabbitmq/unix/socket.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/librabbitmq/windows/socket.c b/librabbitmq/windows/socket.c
index faf6819..72ad200 100644
--- a/librabbitmq/windows/socket.c
+++ b/librabbitmq/windows/socket.c
@@ -33,7 +33,9 @@
/* See http://msdn.microsoft.com/en-us/library/ms737629%28VS.85%29.aspx */
#define WIN32_LEAN_AND_MEAN
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <windows.h>
#include <stdint.h>
diff --git a/tools/common.c b/tools/common.c
index 38df751..71ae07d 100644
--- a/tools/common.c
+++ b/tools/common.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifndef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/consume.c b/tools/consume.c
index 83a5164..9c53606 100644
--- a/tools/consume.c
+++ b/tools/consume.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/declare_queue.c b/tools/declare_queue.c
index d6bb9db..5c6a2bd 100644
--- a/tools/declare_queue.c
+++ b/tools/declare_queue.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/delete_queue.c b/tools/delete_queue.c
index e596096..d9594e9 100644
--- a/tools/delete_queue.c
+++ b/tools/delete_queue.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/get.c b/tools/get.c
index 57ebedb..b3e0e81 100644
--- a/tools/get.c
+++ b/tools/get.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
diff --git a/tools/publish.c b/tools/publish.c
index 57060df..08ae18a 100644
--- a/tools/publish.c
+++ b/tools/publish.c
@@ -30,7 +30,9 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/unix/process.c b/tools/unix/process.c
index 1e0d1d6..624f016 100644
--- a/tools/unix/process.c
+++ b/tools/unix/process.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <unistd.h>
#include <errno.h>
#include <spawn.h>
diff --git a/tools/windows/compat.c b/tools/windows/compat.c
index acba42e..07afa9a 100644
--- a/tools/windows/compat.c
+++ b/tools/windows/compat.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/tools/windows/process.c b/tools/windows/process.c
index 26b9a70..8bc9337 100644
--- a/tools/windows/process.c
+++ b/tools/windows/process.c
@@ -30,6 +30,10 @@
* ***** END LICENSE BLOCK *****
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <io.h>
#include <windows.h>