diff options
author | Michael Steinert <mike.steinert@gmail.com> | 2012-05-16 12:13:31 -0600 |
---|---|---|
committer | Michael Steinert <mike.steinert@gmail.com> | 2012-05-17 11:44:46 -0600 |
commit | c921feb829e79a33938300350e61e3c3fb217968 (patch) | |
tree | b2054ac86a99fc4a52ded75826aad86e2561781b /librabbitmq/amqp_private.h | |
parent | 162fc19f4d896c3db862f1da303823dcbe9780ec (diff) | |
download | rabbitmq-c-github-ask-c921feb829e79a33938300350e61e3c3fb217968.tar.gz |
Set default visibility to hidden & enable a couple more warnings
Enable the following GCC options:
1. -Wstrict-prototypes
2. -Wcast-align
3. -fno-common
4. -fvisibility=hidden
This commit also includes some general cleanup of header files (mostly
for readability).
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Diffstat (limited to 'librabbitmq/amqp_private.h')
-rw-r--r-- | librabbitmq/amqp_private.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/librabbitmq/amqp_private.h b/librabbitmq/amqp_private.h index 27ba3dd..a743c0a 100644 --- a/librabbitmq/amqp_private.h +++ b/librabbitmq/amqp_private.h @@ -33,7 +33,13 @@ * ***** END LICENSE BLOCK ***** */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + +#include "amqp.h" +#include "amqp_framing.h" +#include <string.h> /* Error numbering: Because of differences in error numbering on * different platforms, we want to keep error numbers opaque for @@ -60,12 +66,23 @@ /* GCC attributes */ #if __GNUC__ > 2 | (__GNUC__ == 2 && __GNUC_MINOR__ > 4) #define AMQP_NORETURN \ - __attribute__ ((__noreturn__)) + __attribute__ ((__noreturn__)) #else #define AMQP_NORETURN #endif -extern char *amqp_os_error_string(int err); +#if __GNUC__ >= 4 +#define AMQP_PUBLIC \ + __attribute__ ((visibility ("default"))) +#define AMQP_PRIVATE \ + __attribute__ ((visibility ("hidden"))) +#else +#define AMQP_PUBLIC +#define AMQP_PRIVATE +#endif + +char * +amqp_os_error_string(int err); #include "socket.h" @@ -262,6 +279,7 @@ static inline int amqp_decode_bytes(amqp_bytes_t encoded, size_t *offset, } AMQP_NORETURN -extern void amqp_abort(const char *fmt, ...); +void +amqp_abort(const char *fmt, ...); #endif |