diff options
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/addrinfo.h | 22 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 11 |
2 files changed, 12 insertions, 21 deletions
diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index f0b977d79c..8601d99a77 100644 --- a/ext/socket/addrinfo.h +++ b/ext/socket/addrinfo.h @@ -61,14 +61,6 @@ #undef NI_NUMERICSERV #undef NI_DGRAM -#ifndef __P -# ifdef HAVE_PROTOTYPES -# define __P(args) args -# else -# define __P(args) () -# endif -#endif - /* special compatibility hack -- end*/ @@ -157,27 +149,27 @@ struct addrinfo { #define freeaddrinfo freeaddrinfo__compat #endif -extern int getaddrinfo __P(( +extern int getaddrinfo( const char *hostname, const char *servname, const struct addrinfo *hints, - struct addrinfo **res)); + struct addrinfo **res); -extern int getnameinfo __P(( +extern int getnameinfo( const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, - int flags)); + int flags); -extern void freehostent __P((struct hostent *)); -extern void freeaddrinfo __P((struct addrinfo *)); +extern void freehostent(struct hostent *); +extern void freeaddrinfo(struct addrinfo *); extern #ifdef GAI_STRERROR_CONST const #endif -char *gai_strerror __P((int)); +char *gai_strerror(int); /* In case there is no definition of offsetof() provided - though any proper Standard C system should have one. */ diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index b01f1cb82e..af8391a9f7 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -142,12 +142,11 @@ static const struct afd { #define PTON_MAX 4 #endif -static int get_name __P((const char *, const struct afd *, - struct addrinfo **, char *, struct addrinfo *, - int)); -static int get_addr __P((const char *, int, struct addrinfo **, - struct addrinfo *, int)); -static int str_isnumber __P((const char *)); +static int get_name(const char *, const struct afd *, struct addrinfo **, + char *, struct addrinfo *, int); +static int get_addr(const char *, int, struct addrinfo **, struct addrinfo *, + int); +static int str_isnumber(const char *); static const char *const ai_errlist[] = { "success.", |