diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-04-13 16:29:15 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-09-09 16:32:29 +0900 |
commit | 5a21e04dcb627667ff581d13e443249fa8d102b1 (patch) | |
tree | 67679558df639ba1fb89e9caac94ac030b917f47 /ext | |
parent | 440876c629651d32c12551abb0f157aebe996546 (diff) | |
download | ruby-5a21e04dcb627667ff581d13e443249fa8d102b1.tar.gz |
configure.in: don't check for support for ANSI prototype decl
Our minimum is already C89.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/digest/sha2/sha2.h | 6 | ||||
-rw-r--r-- | ext/socket/addrinfo.h | 22 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 11 |
3 files changed, 13 insertions, 26 deletions
diff --git a/ext/digest/sha2/sha2.h b/ext/digest/sha2/sha2.h index e58f15ae12..9dbda9c6fd 100644 --- a/ext/digest/sha2/sha2.h +++ b/ext/digest/sha2/sha2.h @@ -50,11 +50,7 @@ extern "C" { #include <sys/types.h> #ifdef RUBY -# ifdef HAVE_PROTOTYPES -# undef NOPROTO -# else -# define NOPROTO -# endif /* HAVE_PROTOTYPES */ +# undef NOPROTO # ifndef BYTE_ORDER # define LITTLE_ENDIAN 1234 # define BIG_ENDIAN 4321 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.", |