summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/Makefile.am33
-rw-r--r--examples/amqp_producer.c2
-rw-r--r--examples/utils.c2
-rw-r--r--examples/win32/platform_utils.c (renamed from examples/windows/platform_utils.c)0
5 files changed, 3 insertions, 36 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d5ea525..3194e13 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories(${LIBRABBITMQ_INCLUDE_DIRS})
if (WIN32)
- set(PLATFORM_DIR windows)
+ set(PLATFORM_DIR win32)
else (WIN32)
set(PLATFORM_DIR unix)
endif (WIN32)
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index bde66bd..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-noinst_PROGRAMS = amqp_sendstring amqp_exchange_declare amqp_listen amqp_producer amqp_consumer amqp_unbind amqp_bind amqp_listenq
-
-# The -I to srcdir's librabbitmq is for the main amqp header
-# files. The -I to builddir's librabbitmq is less obvious; it's for
-# VPATH-based builds: the amqp_framing.h gets generated into the
-# *build* directory, not the source directory.
-AM_CFLAGS = -I$(top_srcdir)/librabbitmq -I$(top_builddir)/librabbitmq
-
-if GCC
-# Because we want to build under Microsoft's C compiler (for which
-# there is apparently no demand for C99 support), it's a good idea
-# to have gcc tell us when we stray from the old standard.
-AM_CFLAGS += -ansi -pedantic
-endif
-
-if USE_MSINTTYPES
-AM_CFLAGS += -I$(top_srcdir)/msinttypes
-endif
-
-AM_LDFLAGS = $(top_builddir)/librabbitmq/librabbitmq.la
-
-noinst_HEADERS = utils.h
-
-COMMON_SOURCES = utils.c $(PLATFORM_DIR)/platform_utils.c
-
-amqp_sendstring_SOURCES = amqp_sendstring.c $(COMMON_SOURCES)
-amqp_exchange_declare_SOURCES = amqp_exchange_declare.c $(COMMON_SOURCES)
-amqp_listen_SOURCES = amqp_listen.c $(COMMON_SOURCES)
-amqp_producer_SOURCES = amqp_producer.c $(COMMON_SOURCES)
-amqp_consumer_SOURCES = amqp_consumer.c $(COMMON_SOURCES)
-amqp_unbind_SOURCES = amqp_unbind.c $(COMMON_SOURCES)
-amqp_bind_SOURCES = amqp_bind.c $(COMMON_SOURCES)
-amqp_listenq_SOURCES = amqp_listenq.c $(COMMON_SOURCES)
diff --git a/examples/amqp_producer.c b/examples/amqp_producer.c
index c149a72..22ac6fa 100644
--- a/examples/amqp_producer.c
+++ b/examples/amqp_producer.c
@@ -57,7 +57,7 @@ static void send_batch(amqp_connection_state_t conn,
char message[256];
amqp_bytes_t message_bytes;
- for (i = 0; i < sizeof(message); i++) {
+ for (i = 0; i < (int)sizeof(message); i++) {
message[i] = i & 0xff;
}
diff --git a/examples/utils.c b/examples/utils.c
index 5adbc2c..871fc2a 100644
--- a/examples/utils.c
+++ b/examples/utils.c
@@ -135,7 +135,7 @@ void amqp_dump(void const *buffer, size_t len) {
int chs[16];
int oldchs[16];
int showed_dots = 0;
- int i;
+ size_t i;
for (i = 0; i < len; i++) {
int ch = buf[i];
diff --git a/examples/windows/platform_utils.c b/examples/win32/platform_utils.c
index ee97238..ee97238 100644
--- a/examples/windows/platform_utils.c
+++ b/examples/win32/platform_utils.c