X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=socket.h;h=9d9406d958c4eae21dfe3d901807dce816bcf4bf;hb=adad2fc62f159c7e43c36af0ad4f9bf9f6b3efc7;hp=0c4ac001d219505555857c736eafdb9e93e0095a;hpb=ad72be8e9a6eeb93668cf51975d8df22e2f45beb;p=~andy%2Ffetchmail diff --git a/socket.h b/socket.h index 0c4ac001..9d9406d9 100644 --- a/socket.h +++ b/socket.h @@ -10,17 +10,12 @@ struct addrinfo; #include -#ifdef HAVE_SYS_SOCKET_H #include -#elif HAVE_NET_SOCKET_H -#include -#endif #include /** Create a new client socket; returns -1 on error */ int SockOpen(const char *host, const char *service, const char *plugin, struct addrinfo **); - /** Get a string terminated by an '\n' (matches interface of fgets). Pass it a valid socket, a buffer for the string, and @@ -41,7 +36,7 @@ Returns number of bytes successfully written. int SockWrite(int sock, const char *buf, int size); /* from /usr/include/sys/cdefs.h */ -#if !defined __GNUC__ || __GNUC__ < 2 +#if !defined __GNUC__ # define __attribute__(xyz) /* Ignore. */ #endif @@ -49,13 +44,9 @@ int SockWrite(int sock, const char *buf, int size); Send formatted output to the socket (matches interface of fprintf). Returns number of bytes successfully written. */ -#if defined(HAVE_STDARG_H) int SockPrintf(int sock, const char *format, ...) __attribute__ ((format (printf, 2, 3))) ; -#else -int SockPrintf(); -#endif /** Close a socket previously opened by SockOpen. This allows for some