summaryrefslogtreecommitdiff
path: root/librabbitmq
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2021-04-06 04:39:58 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2021-04-05 22:40:08 -0700
commitc8c117097934c9d2ecab30ce70efba98f0e267f8 (patch)
treee1e7ef1ccda0e3cd2f7c334e0d66bb4dd1e72d31 /librabbitmq
parent5a75fbed8a4a86b612c9ecb83f78ca59e43e2838 (diff)
downloadrabbitmq-c-c8c117097934c9d2ecab30ce70efba98f0e267f8.tar.gz
Move official includes to rabbitmq-c/ directory
Move official rabbitmq-c includes under the rabbitmq-c, thus new programs should use the following include paths: amqp.h -> rabbitmq-c/amqp.h amqp_tcp_socket.h -> rabbitmq-c/tcp_socket.h amqp_ssl_socket .h-> rabbitmq-c/ssl_socket.h amqp_framing.h -> rabbitmq-c/framing.h Existing include files are left with a warning message and including their new equivalents, so existing programs should compile without modification. Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to 'librabbitmq')
-rw-r--r--librabbitmq/CMakeLists.txt28
-rw-r--r--librabbitmq/amqp_connection.c2
-rw-r--r--librabbitmq/amqp_consumer.c2
-rw-r--r--librabbitmq/amqp_openssl.c2
-rw-r--r--librabbitmq/amqp_private.h4
-rw-r--r--librabbitmq/amqp_table.h2
-rw-r--r--librabbitmq/amqp_tcp_socket.c2
-rw-r--r--librabbitmq/amqp_time.c2
8 files changed, 29 insertions, 15 deletions
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index 262b726..84a6363 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -2,8 +2,9 @@ if (REGENERATE_AMQP_FRAMING)
set(AMQP_CODEGEN_PY "${CMAKE_CURRENT_BINARY_DIR}/amqp_codegen.py")
set(CODEGEN_PY "${CMAKE_CURRENT_BINARY_DIR}/codegen.py")
set(AMQP_SPEC_JSON_PATH "${AMQP_CODEGEN_DIR}/amqp-rabbitmq-0.9.1.json")
- set(AMQP_FRAMING_H_PATH ${CMAKE_CURRENT_BINARY_DIR}/amqp_framing.h)
+ set(AMQP_FRAMING_H_PATH ${CMAKE_CURRENT_BINARY_DIR}/rabbitmq-c/framing.h)
set(AMQP_FRAMING_C_PATH ${CMAKE_CURRENT_BINARY_DIR}/amqp_framing.c)
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rabbitmq-c)
if (PYTHON_VERSION_MAJOR GREATER 2)
set(CONVERT_CODEGEN ${PYTHON_2TO3_EXECUTABLE} -w ${CODEGEN_PY} > codegen_2to3.out)
@@ -32,14 +33,14 @@ if (REGENERATE_AMQP_FRAMING)
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CODEGEN_PY} header ${AMQP_SPEC_JSON_PATH} ${AMQP_FRAMING_H_PATH}
DEPENDS ${AMQP_SPEC_JSON_PATH} ${CODEGEN_PY} ${AMQP_CODEGEN_PY}
VERBATIM)
-
+
add_custom_command(
OUTPUT ${AMQP_FRAMING_C_PATH}
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CODEGEN_PY} body ${AMQP_SPEC_JSON_PATH} ${AMQP_FRAMING_C_PATH}
DEPENDS ${AMQP_SPEC_JSON_PATH} ${CODEGEN_PY} ${AMQP_CODEGEN_PY}
VERBATIM)
else (REGENERATE_AMQP_FRAMING)
- set(AMQP_FRAMING_H_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../include/amqp_framing.h)
+ set(AMQP_FRAMING_H_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../include/rabbitmq-c/framing.h)
set(AMQP_FRAMING_C_PATH ${CMAKE_CURRENT_SOURCE_DIR}/amqp_framing.c)
endif (REGENERATE_AMQP_FRAMING)
@@ -61,9 +62,12 @@ add_definitions(-DHAVE_CONFIG_H)
if (ENABLE_SSL_SUPPORT)
add_definitions(-DWITH_SSL=1)
- set(AMQP_SSL_SOCKET_H_PATH ../include/amqp_ssl_socket.h)
+ SET(AMQP_SSL_SOCKET_SHIM_PATH ../include/amqp_ssl_socket.h)
+ set(AMQP_SSL_SOCKET_H_PATH ../include/rabbitmq-c/ssl_socket.h)
- set(AMQP_SSL_SRCS ${AMQP_SSL_SOCKET_H_PATH}
+ set(AMQP_SSL_SRCS
+ ${AMQP_SSL_SOCKET_SHIM_PATH}
+ ${AMQP_SSL_SOCKET_H_PATH}
amqp_openssl.c
amqp_openssl_hostname_validation.c
amqp_openssl_hostname_validation.h
@@ -93,7 +97,9 @@ set(RABBITMQ_SOURCES
${AMQP_FRAMING_H_PATH}
${AMQP_FRAMING_C_PATH}
../include/amqp.h
+ ../include/rabbitmq-c/amqp.h
../include/amqp_tcp_socket.h
+ ../include/rabbitmq-c/tcp_socket.h
amqp_api.c amqp_connection.c amqp_mem.c amqp_private.h amqp_socket.c
amqp_table.c amqp_url.c amqp_socket.h amqp_tcp_socket.c
amqp_time.c amqp_time.h
@@ -158,9 +164,17 @@ endif (BUILD_STATIC_LIBS)
install(FILES
../include/amqp.h
- ${AMQP_FRAMING_H_PATH}
+ ../include/amqp_framing.h
../include/amqp_tcp_socket.h
- ${AMQP_SSL_SOCKET_H_PATH}
+ ${AMQP_SSL_SOCKET_SHIM_PATH}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(FILES
+ ../include/rabbitmq-c/amqp.h
+ ../include/rabbitmq-c/framing.h
+ ../include/rabbitmq-c/tcp_socket.h
+ ${AMQP_SSL_SOCKET_H_PATH}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rabbitmq-c
+)
+
set(RMQ_LIBRARY_TARGET ${RMQ_LIBRARY_TARGET} PARENT_SCOPE)
diff --git a/librabbitmq/amqp_connection.c b/librabbitmq/amqp_connection.c
index d389be3..85ac99f 100644
--- a/librabbitmq/amqp_connection.c
+++ b/librabbitmq/amqp_connection.c
@@ -42,8 +42,8 @@
#endif
#include "amqp_private.h"
-#include "amqp_tcp_socket.h"
#include "amqp_time.h"
+#include "rabbitmq-c/tcp_socket.h"
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
diff --git a/librabbitmq/amqp_consumer.c b/librabbitmq/amqp_consumer.c
index 1140e61..bbb8fc1 100644
--- a/librabbitmq/amqp_consumer.c
+++ b/librabbitmq/amqp_consumer.c
@@ -26,9 +26,9 @@
* SOFTWARE.
* ***** END LICENSE BLOCK *****
*/
-#include "amqp.h"
#include "amqp_private.h"
#include "amqp_socket.h"
+#include "rabbitmq-c/amqp.h"
#include <stdlib.h>
#include <string.h>
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c
index 1aa5f1e..058d69a 100644
--- a/librabbitmq/amqp_openssl.c
+++ b/librabbitmq/amqp_openssl.c
@@ -36,8 +36,8 @@
#include "amqp_openssl_hostname_validation.h"
#include "amqp_private.h"
#include "amqp_socket.h"
-#include "amqp_ssl_socket.h"
#include "amqp_time.h"
+#include "rabbitmq-c/ssl_socket.h"
#include "threads.h"
#include <ctype.h>
diff --git a/librabbitmq/amqp_private.h b/librabbitmq/amqp_private.h
index b5266fa..591566f 100644
--- a/librabbitmq/amqp_private.h
+++ b/librabbitmq/amqp_private.h
@@ -44,8 +44,8 @@
"Copyright (c) 2007-2014 VMWare Inc, Tony Garnock-Jones," \
" and Alan Antonuk."
-#include "amqp.h"
-#include "amqp_framing.h"
+#include "rabbitmq-c/amqp.h"
+#include "rabbitmq-c/framing.h"
#include <string.h>
#if ((defined(_WIN32)) || (defined(__MINGW32__)) || (defined(__MINGW64__)))
diff --git a/librabbitmq/amqp_table.h b/librabbitmq/amqp_table.h
index 7b009a9..714290d 100644
--- a/librabbitmq/amqp_table.h
+++ b/librabbitmq/amqp_table.h
@@ -29,8 +29,8 @@
#ifndef AMQP_TABLE_H
#define AMQP_TABLE_H
-#include "amqp.h"
#include "amqp_private.h"
+#include "rabbitmq-c/amqp.h"
/**
* Initializes a table entry with utf-8 string type value.
diff --git a/librabbitmq/amqp_tcp_socket.c b/librabbitmq/amqp_tcp_socket.c
index 57698ea..2efb828 100644
--- a/librabbitmq/amqp_tcp_socket.c
+++ b/librabbitmq/amqp_tcp_socket.c
@@ -25,7 +25,7 @@
#endif
#include "amqp_private.h"
-#include "amqp_tcp_socket.h"
+#include "rabbitmq-c/tcp_socket.h"
#include <errno.h>
#if ((defined(_WIN32)) || (defined(__MINGW32__)) || (defined(__MINGW64__)))
diff --git a/librabbitmq/amqp_time.c b/librabbitmq/amqp_time.c
index d61483a..4252a68 100644
--- a/librabbitmq/amqp_time.c
+++ b/librabbitmq/amqp_time.c
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#include "amqp_time.h"
-#include "amqp.h"
+#include "rabbitmq-c/amqp.h"
#include <assert.h>
#include <limits.h>
#include <string.h>