summaryrefslogtreecommitdiff
path: root/librabbitmq/unix
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2012-05-16 12:13:31 -0600
committerMichael Steinert <mike.steinert@gmail.com>2012-05-17 11:44:46 -0600
commitc921feb829e79a33938300350e61e3c3fb217968 (patch)
treeb2054ac86a99fc4a52ded75826aad86e2561781b /librabbitmq/unix
parent162fc19f4d896c3db862f1da303823dcbe9780ec (diff)
downloadrabbitmq-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/unix')
-rw-r--r--librabbitmq/unix/socket.c24
-rw-r--r--librabbitmq/unix/socket.h25
2 files changed, 28 insertions, 21 deletions
diff --git a/librabbitmq/unix/socket.c b/librabbitmq/unix/socket.c
index d0e2400..cb8a2b9 100644
--- a/librabbitmq/unix/socket.c
+++ b/librabbitmq/unix/socket.c
@@ -34,17 +34,27 @@
#include "config.h"
#endif
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
+#include "amqp_private.h"
+#include "socket.h"
#include <fcntl.h>
#include <stdint.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
-#include "amqp.h"
-#include "amqp_private.h"
-#include "socket.h"
+int
+amqp_socket_init(void)
+{
+ return 0;
+}
+
+int
+amqp_socket_error(void)
+{
+ return errno | ERROR_CATEGORY_OS;
+}
int amqp_socket_socket(int domain, int type, int proto)
{
diff --git a/librabbitmq/unix/socket.h b/librabbitmq/unix/socket.h
index af86ffb..ff6fa73 100644
--- a/librabbitmq/unix/socket.h
+++ b/librabbitmq/unix/socket.h
@@ -34,28 +34,25 @@
*/
#include <errno.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
-static inline int amqp_socket_init(void)
-{
- return 0;
-}
+int
+amqp_socket_init(void);
-extern int amqp_socket_socket(int domain, int type, int proto);
+int
+amqp_socket_socket(int domain, int type, int proto);
+
+int
+amqp_socket_error(void);
#define amqp_socket_setsockopt setsockopt
#define amqp_socket_close close
#define amqp_socket_writev writev
-static inline int amqp_socket_error()
-{
- return errno | ERROR_CATEGORY_OS;
-}
-
#endif