include/netdb.h: remove use of 'restrict'. Causes compile errors with some toolchains. Add formal parameter names to prototypes so that they are more self-documenting.

This commit is contained in:
Gregory Nutt 2018-06-12 21:11:48 -06:00
parent 9f682056f9
commit c213bac2c4

View File

@ -270,12 +270,12 @@ void endnetent(void);
void endprotoent(void); void endprotoent(void);
void endservent(void); void endservent(void);
#endif #endif
void freeaddrinfo(FAR struct addrinfo *); void freeaddrinfo(FAR struct addrinfo *ai);
FAR const char *gai_strerror(int); FAR const char *gai_strerror(int);
int getaddrinfo(FAR const char *restrict, int getaddrinfo(FAR const char *nodename,
FAR const char *restrict, FAR const char *servname,
FAR const struct addrinfo *restrict, FAR const struct addrinfo *hints,
FAR struct addrinfo **restrict); FAR struct addrinfo **res);
FAR struct hostent *gethostbyaddr(FAR const void *addr, socklen_t len, FAR struct hostent *gethostbyaddr(FAR const void *addr, socklen_t len,
int type); int type);
@ -285,21 +285,21 @@ FAR struct servent *getservbyname(FAR const char *name,
#if 0 /* None of these are yet supported */ #if 0 /* None of these are yet supported */
FAR struct hostent *gethostent(void); FAR struct hostent *gethostent(void);
int getnameinfo(FAR const struct sockaddr *restrict, int getnameinfo(FAR const struct sockaddr *sa,
socklen_t, FAR char *restrict, socklen_t salen, FAR char *node,
socklen_t, FAR char *restrict, socklen_t nodelen, FAR char *service,
socklen_t, int); socklen_t servicelen, int flags);
FAR struct netent *getnetbyaddr(uint32_t, int); FAR struct netent *getnetbyaddr(uint32_t net, int type);
FAR struct netent *getnetbyname(FAR const char *); FAR struct netent *getnetbyname(FAR const char *name);
FAR struct netent *getnetent(void); FAR struct netent *getnetent(void);
FAR struct protoent *getprotobyname(FAR const char *); FAR struct protoent *getprotobyname(FAR const char *name);
FAR struct protoent *getprotobynumber(int); FAR struct protoent *getprotobynumber(int proto);
FAR struct protoent *getprotoent(void); FAR struct protoent *getprotoent(void);
FAR struct servent *getservbyport(int, FAR const char *); FAR struct servent *getservbyport(int port, FAR const char *proto);
FAR struct servent *getservent(void); FAR struct servent *getservent(void);
void sethostent(int); void sethostent(int);
void setnetent(int); void setnetent(int stayopen);
void setprotoent(int); void setprotoent(int stayopen);
void setservent(int); void setservent(int);
#endif /* None of these are yet supported */ #endif /* None of these are yet supported */