From c4dbaf19e2fef30333948c52273d62334c817119 Mon Sep 17 00:00:00 2001 From: Michael Steinert Date: Tue, 15 May 2012 18:00:51 -0600 Subject: Add config.h header guards Signed-off-by: Michael Steinert --- librabbitmq/CMakeLists.txt | 5 ++++- librabbitmq/amqp_api.c | 2 ++ librabbitmq/amqp_connection.c | 4 ++++ librabbitmq/amqp_mem.c | 5 ++++- librabbitmq/amqp_socket.c | 4 ++++ librabbitmq/amqp_table.c | 4 ++++ librabbitmq/amqp_url.c | 4 ++++ librabbitmq/unix/socket.c | 2 ++ librabbitmq/windows/socket.c | 2 ++ tools/common.c | 2 ++ tools/consume.c | 2 ++ tools/declare_queue.c | 2 ++ tools/delete_queue.c | 2 ++ tools/get.c | 2 ++ tools/publish.c | 2 ++ tools/unix/process.c | 4 ++++ tools/windows/compat.c | 4 ++++ tools/windows/process.c | 4 ++++ 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 #include 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 #include #include 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 #include #include @@ -38,7 +42,6 @@ #include #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 #include #include 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 #include #include 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 #include #include 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 #include 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 #include 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 #include 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 #include 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 #include 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 #include 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 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 #include 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 #include #include 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 #include #include 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 #include #include -- cgit v1.2.1