From: Automatic source maintenance Date: Tue, 19 Oct 2010 00:12:13 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: take1~166 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96fa471d7d448e5342cea2cd13885a246431ea02;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/compat/os/opensolaris_10_netdb.h b/compat/os/opensolaris_10_netdb.h index 677caad255..74c620b76a 100644 --- a/compat/os/opensolaris_10_netdb.h +++ b/compat/os/opensolaris_10_netdb.h @@ -95,57 +95,57 @@ extern "C" { #define _PATH_PROTOCOLS "/etc/protocols" #define _PATH_SERVICES "/etc/services" -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ + struct hostent { + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ + int h_addrtype; /* host address type */ + int h_length; /* length of address */ + char **h_addr_list; /* list of addresses from name server */ #define h_addr h_addr_list[0] /* address, for backward compatiblity */ -}; + }; -/* - * addrinfo introduced with IPv6 for Protocol-Independent Hostname - * and Service Name Translation. - */ + /* + * addrinfo introduced with IPv6 for Protocol-Independent Hostname + * and Service Name Translation. + */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ + struct addrinfo { + int ai_flags; /* AI_PASSIVE, AI_CANONNAME, ... */ + int ai_family; /* PF_xxx */ + int ai_socktype; /* SOCK_xxx */ + int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ #ifdef __sparcv9 - int _ai_pad; /* for backwards compat with old size_t */ + int _ai_pad; /* for backwards compat with old size_t */ #endif /* __sparcv9 */ - socklen_t ai_addrlen; - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ -}; + socklen_t ai_addrlen; + char *ai_canonname; /* canonical name for hostname */ + struct sockaddr *ai_addr; /* binary address */ + struct addrinfo *ai_next; /* next structure in linked list */ + }; -/* addrinfo flags */ + /* addrinfo flags */ #define AI_PASSIVE 0x0008 /* intended for bind() + listen() */ #define AI_CANONNAME 0x0010 /* return canonical version of host */ #define AI_NUMERICHOST 0x0020 /* use numeric node address string */ #define AI_NUMERICSERV 0x0040 /* servname is assumed numeric */ -/* getipnodebyname() flags */ + /* getipnodebyname() flags */ #define AI_V4MAPPED 0x0001 /* IPv4 mapped addresses if no IPv6 */ #define AI_ALL 0x0002 /* IPv6 and IPv4 mapped addresses */ #define AI_ADDRCONFIG 0x0004 /* AAAA or A records only if IPv6/IPv4 cnfg'd */ -/* - * These were defined in RFC 2553 but not SUSv3 - * or RFC 3493 which obsoleted 2553. - */ + /* + * These were defined in RFC 2553 but not SUSv3 + * or RFC 3493 which obsoleted 2553. + */ #if !defined(_XPG6) || defined(__EXTENSIONS__) #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) -/* addrinfo errors */ + /* addrinfo errors */ #define EAI_ADDRFAMILY 1 /* address family not supported */ #define EAI_NODATA 7 /* no address */ #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ @@ -162,7 +162,7 @@ struct addrinfo { #define EAI_PROTOCOL 13 #define EAI_MAX 14 -/* getnameinfo flags */ + /* getnameinfo flags */ #define NI_NOFQDN 0x0001 #define NI_NUMERICHOST 0x0002 /* return numeric form of address */ #define NI_NAMEREQD 0x0004 /* request DNS name */ @@ -170,139 +170,139 @@ struct addrinfo { #define NI_DGRAM 0x0010 #if !defined(_XPG6) || defined(__EXTENSIONS__) -/* Not listed in any standards document */ + /* Not listed in any standards document */ #define NI_WITHSCOPEID 0x0020 #define NI_NUMERICSCOPE 0x0040 -/* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */ + /* getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493 */ #define NI_MAXHOST 1025 #define NI_MAXSERV 32 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ -/* - * Scope delimit character - */ + /* + * Scope delimit character + */ #define SCOPE_DELIMITER '%' -/* - * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols - * and algorithms. - */ + /* + * Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols + * and algorithms. + */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -typedef struct ipsecalgent { - char **a_names; /* algorithm names */ - int a_proto_num; /* protocol number */ - int a_alg_num; /* algorithm number */ - char *a_mech_name; /* encryption framework mechanism name */ - int *a_block_sizes; /* supported block sizes */ - int *a_key_sizes; /* supported key sizes */ - int a_key_increment; /* key size increment */ - int *a_mech_params; /* mechanism specific parameters */ - int a_alg_flags; /* algorithm flags */ -} ipsecalgent_t; - -/* well-known IPsec protocol numbers */ + typedef struct ipsecalgent { + char **a_names; /* algorithm names */ + int a_proto_num; /* protocol number */ + int a_alg_num; /* algorithm number */ + char *a_mech_name; /* encryption framework mechanism name */ + int *a_block_sizes; /* supported block sizes */ + int *a_key_sizes; /* supported key sizes */ + int a_key_increment; /* key size increment */ + int *a_mech_params; /* mechanism specific parameters */ + int a_alg_flags; /* algorithm flags */ + } ipsecalgent_t; + + /* well-known IPsec protocol numbers */ #define IPSEC_PROTO_AH 2 #define IPSEC_PROTO_ESP 3 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -/* - * Assumption here is that a network number - * fits in 32 bits -- probably a poor one. - */ -struct netent { - char *n_name; /* official name of net */ - char **n_aliases; /* alias list */ - int n_addrtype; /* net address type */ - in_addr_t n_net; /* network # */ -}; - -struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ -}; - -struct servent { - char *s_name; /* official service name */ - char **s_aliases; /* alias list */ - int s_port; /* port # */ - char *s_proto; /* protocol to use */ -}; + /* + * Assumption here is that a network number + * fits in 32 bits -- probably a poor one. + */ + struct netent { + char *n_name; /* official name of net */ + char **n_aliases; /* alias list */ + int n_addrtype; /* net address type */ + in_addr_t n_net; /* network # */ + }; + + struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol # */ + }; + + struct servent { + char *s_name; /* official service name */ + char **s_aliases; /* alias list */ + int s_port; /* port # */ + char *s_proto; /* protocol to use */ + }; #ifdef __STDC__ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -struct hostent *gethostbyname_r - (const char *, struct hostent *, char *, int, int *h_errnop); -struct hostent *gethostbyaddr_r - (const char *, int, int, struct hostent *, char *, int, int *h_errnop); -struct hostent *getipnodebyname(const char *, int, int, int *); -struct hostent *getipnodebyaddr(const void *, size_t, int, int *); -void freehostent(struct hostent *); -struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop); - -struct servent *getservbyname_r - (const char *name, const char *, struct servent *, char *, int); -struct servent *getservbyport_r - (int port, const char *, struct servent *, char *, int); -struct servent *getservent_r(struct servent *, char *, int); - -struct netent *getnetbyname_r - (const char *, struct netent *, char *, int); -struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int); -struct netent *getnetent_r(struct netent *, char *, int); - -struct protoent *getprotobyname_r - (const char *, struct protoent *, char *, int); -struct protoent *getprotobynumber_r - (int, struct protoent *, char *, int); -struct protoent *getprotoent_r(struct protoent *, char *, int); - -int getnetgrent_r(char **, char **, char **, char *, int); -int innetgr(const char *, const char *, const char *, const char *); + struct hostent *gethostbyname_r + (const char *, struct hostent *, char *, int, int *h_errnop); + struct hostent *gethostbyaddr_r + (const char *, int, int, struct hostent *, char *, int, int *h_errnop); + struct hostent *getipnodebyname(const char *, int, int, int *); + struct hostent *getipnodebyaddr(const void *, size_t, int, int *); + void freehostent(struct hostent *); + struct hostent *gethostent_r(struct hostent *, char *, int, int *h_errnop); + + struct servent *getservbyname_r + (const char *name, const char *, struct servent *, char *, int); + struct servent *getservbyport_r + (int port, const char *, struct servent *, char *, int); + struct servent *getservent_r(struct servent *, char *, int); + + struct netent *getnetbyname_r + (const char *, struct netent *, char *, int); + struct netent *getnetbyaddr_r(long, int, struct netent *, char *, int); + struct netent *getnetent_r(struct netent *, char *, int); + + struct protoent *getprotobyname_r + (const char *, struct protoent *, char *, int); + struct protoent *getprotobynumber_r + (int, struct protoent *, char *, int); + struct protoent *getprotoent_r(struct protoent *, char *, int); + + int getnetgrent_r(char **, char **, char **, char *, int); + int innetgr(const char *, const char *, const char *, const char *); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -/* Old interfaces that return a pointer to a static area; MT-unsafe */ -struct hostent *gethostbyname(const char *); -struct hostent *gethostent(void); -struct netent *getnetbyaddr(in_addr_t, int); -struct netent *getnetbyname(const char *); -struct netent *getnetent(void); -struct protoent *getprotobyname(const char *); -struct protoent *getprotobynumber(int); -struct protoent *getprotoent(void); -struct servent *getservbyname(const char *, const char *); -struct servent *getservbyport(int, const char *); -struct servent *getservent(void); - -/* gethostbyaddr() second argument is a size_t only in unix95/unix98 */ + /* Old interfaces that return a pointer to a static area; MT-unsafe */ + struct hostent *gethostbyname(const char *); + struct hostent *gethostent(void); + struct netent *getnetbyaddr(in_addr_t, int); + struct netent *getnetbyname(const char *); + struct netent *getnetent(void); + struct protoent *getprotobyname(const char *); + struct protoent *getprotobynumber(int); + struct protoent *getprotoent(void); + struct servent *getservbyname(const char *, const char *); + struct servent *getservbyport(int, const char *); + struct servent *getservent(void); + + /* gethostbyaddr() second argument is a size_t only in unix95/unix98 */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) -struct hostent *gethostbyaddr(const void *, socklen_t, int); + struct hostent *gethostbyaddr(const void *, socklen_t, int); #else -struct hostent *gethostbyaddr(const void *, size_t, int); + struct hostent *gethostbyaddr(const void *, size_t, int); #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -int endhostent(void); -int endnetent(void); -int endprotoent(void); -int endservent(void); -int sethostent(int); -int setnetent(int); -int setprotoent(int); -int setservent(int); + int endhostent(void); + int endnetent(void); + int endprotoent(void); + int endservent(void); + int sethostent(int); + int setnetent(int); + int setprotoent(int); + int setservent(int); #else -void endhostent(void); -void endnetent(void); -void endprotoent(void); -void endservent(void); -void sethostent(int); -void setnetent(int); -void setprotoent(int); -void setservent(int); + void endhostent(void); + void endnetent(void); + void endprotoent(void); + void endservent(void); + void sethostent(int); + void setnetent(int); + void setprotoent(int); + void setservent(int); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) @@ -315,148 +315,148 @@ void setservent(int); #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _XPG6 */ -int getaddrinfo(const char *_RESTRICT_KYWD1, - const char *_RESTRICT_KYWD2, - const struct addrinfo *_RESTRICT_KYWD3, - struct addrinfo **_RESTRICT_KYWD4); -void freeaddrinfo(struct addrinfo *); -const char *gai_strerror(int); -int getnameinfo(const struct sockaddr *_RESTRICT_KYWD1, - socklen_t, char *_RESTRICT_KYWD2, socklen_t, - char *_RESTRICT_KYWD3, socklen_t, int); + int getaddrinfo(const char *_RESTRICT_KYWD1, + const char *_RESTRICT_KYWD2, + const struct addrinfo *_RESTRICT_KYWD3, + struct addrinfo **_RESTRICT_KYWD4); + void freeaddrinfo(struct addrinfo *); + const char *gai_strerror(int); + int getnameinfo(const struct sockaddr *_RESTRICT_KYWD1, + socklen_t, char *_RESTRICT_KYWD2, socklen_t, + char *_RESTRICT_KYWD3, socklen_t, int); #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -int getnetgrent(char **, char **, char **); -int setnetgrent(const char *); -int endnetgrent(void); -int rcmd(char **, unsigned short, - const char *, const char *, const char *, int *); -int rcmd_af(char **, unsigned short, - const char *, const char *, const char *, int *, int); -int rresvport_af(int *, int); -int rresvport_addr(int *, struct sockaddr_storage *); -int rexec(char **, unsigned short, - const char *, const char *, const char *, int *); -int rexec_af(char **, unsigned short, - const char *, const char *, const char *, int *, int); -int rresvport(int *); -int ruserok(const char *, int, const char *, const char *); -/* BIND */ -struct hostent *gethostbyname2(const char *, int); -void herror(const char *); -const char *hstrerror(int); -/* End BIND */ - -/* IPsec algorithm prototype definitions */ -struct ipsecalgent *getipsecalgbyname(const char *, int, int *); -struct ipsecalgent *getipsecalgbynum(int, int, int *); -int getipsecprotobyname(const char *doi_name); -char *getipsecprotobynum(int doi_domain); -void freeipsecalgent(struct ipsecalgent *ptr); -/* END IPsec algorithm prototype definitions */ + int getnetgrent(char **, char **, char **); + int setnetgrent(const char *); + int endnetgrent(void); + int rcmd(char **, unsigned short, + const char *, const char *, const char *, int *); + int rcmd_af(char **, unsigned short, + const char *, const char *, const char *, int *, int); + int rresvport_af(int *, int); + int rresvport_addr(int *, struct sockaddr_storage *); + int rexec(char **, unsigned short, + const char *, const char *, const char *, int *); + int rexec_af(char **, unsigned short, + const char *, const char *, const char *, int *, int); + int rresvport(int *); + int ruserok(const char *, int, const char *, const char *); + /* BIND */ + struct hostent *gethostbyname2(const char *, int); + void herror(const char *); + const char *hstrerror(int); + /* End BIND */ + + /* IPsec algorithm prototype definitions */ + struct ipsecalgent *getipsecalgbyname(const char *, int, int *); + struct ipsecalgent *getipsecalgbynum(int, int, int *); + int getipsecprotobyname(const char *doi_name); + char *getipsecprotobynum(int doi_domain); + void freeipsecalgent(struct ipsecalgent *ptr); + /* END IPsec algorithm prototype definitions */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ #else /* __STDC__ */ -struct hostent *gethostbyname_r(); -struct hostent *gethostbyaddr_r(); -struct hostent *getipnodebyname(); -struct hostent *getipnodebyaddr(); -void freehostent(); -struct hostent *gethostent_r(); -struct servent *getservbyname_r(); -struct servent *getservbyport_r(); -struct servent *getservent_r(); -struct netent *getnetbyname_r(); -struct netent *getnetbyaddr_r(); -struct netent *getnetent_r(); -struct protoent *getprotobyname_r(); -struct protoent *getprotobynumber_r(); -struct protoent *getprotoent_r(); -int getnetgrent_r(); -int innetgr(); - -/* Old interfaces that return a pointer to a static area; MT-unsafe */ -struct hostent *gethostbyname(); -struct hostent *gethostbyaddr(); -struct hostent *gethostent(); -struct netent *getnetbyname(); -struct netent *getnetbyaddr(); -struct netent *getnetent(); -struct servent *getservbyname(); -struct servent *getservbyport(); -struct servent *getservent(); -struct protoent *getprotobyname(); -struct protoent *getprotobynumber(); -struct protoent *getprotoent(); -int getnetgrent(); - -int sethostent(); -int endhostent(); -int setnetent(); -int endnetent(); -int setservent(); -int endservent(); -int setprotoent(); -int endprotoent(); -int setnetgrent(); -int endnetgrent(); -int rcmd(); -int rcmd_af(); -int rexec(); -int rexec_af(); -int rresvport(); -int rresvport_af(); -int rresvport_addr(); -int ruserok(); -/* BIND */ -struct hostent *gethostbyname2(); -void herror(); -char *hstrerror(); -/* IPv6 prototype definitons */ -int getaddrinfo(); -void freeaddrinfo(); -const char *gai_strerror(); -int getnameinfo(); -/* END IPv6 prototype definitions */ -/* End BIND */ + struct hostent *gethostbyname_r(); + struct hostent *gethostbyaddr_r(); + struct hostent *getipnodebyname(); + struct hostent *getipnodebyaddr(); + void freehostent(); + struct hostent *gethostent_r(); + struct servent *getservbyname_r(); + struct servent *getservbyport_r(); + struct servent *getservent_r(); + struct netent *getnetbyname_r(); + struct netent *getnetbyaddr_r(); + struct netent *getnetent_r(); + struct protoent *getprotobyname_r(); + struct protoent *getprotobynumber_r(); + struct protoent *getprotoent_r(); + int getnetgrent_r(); + int innetgr(); + + /* Old interfaces that return a pointer to a static area; MT-unsafe */ + struct hostent *gethostbyname(); + struct hostent *gethostbyaddr(); + struct hostent *gethostent(); + struct netent *getnetbyname(); + struct netent *getnetbyaddr(); + struct netent *getnetent(); + struct servent *getservbyname(); + struct servent *getservbyport(); + struct servent *getservent(); + struct protoent *getprotobyname(); + struct protoent *getprotobynumber(); + struct protoent *getprotoent(); + int getnetgrent(); + + int sethostent(); + int endhostent(); + int setnetent(); + int endnetent(); + int setservent(); + int endservent(); + int setprotoent(); + int endprotoent(); + int setnetgrent(); + int endnetgrent(); + int rcmd(); + int rcmd_af(); + int rexec(); + int rexec_af(); + int rresvport(); + int rresvport_af(); + int rresvport_addr(); + int ruserok(); + /* BIND */ + struct hostent *gethostbyname2(); + void herror(); + char *hstrerror(); + /* IPv6 prototype definitons */ + int getaddrinfo(); + void freeaddrinfo(); + const char *gai_strerror(); + int getnameinfo(); + /* END IPv6 prototype definitions */ + /* End BIND */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -/* IPsec algorithm prototype definitions */ -struct ipsecalgent *getalgbyname(); -struct ipsecalgent *getalgbydoi(); -int getdoidomainbyname(); -const char *getdoidomainbynum(); -void freealgent(); -/* END IPsec algorithm prototype definitions */ + /* IPsec algorithm prototype definitions */ + struct ipsecalgent *getalgbyname(); + struct ipsecalgent *getalgbydoi(); + int getdoidomainbyname(); + const char *getdoidomainbynum(); + void freealgent(); + /* END IPsec algorithm prototype definitions */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ #endif /* __STDC__ */ -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver) - */ + /* + * Error return codes from gethostbyname() and gethostbyaddr() + * (when using the resolver) + */ -extern int h_errno; + extern int h_errno; #ifdef _REENTRANT #ifdef __STDC__ -extern int *__h_errno(void); + extern int *__h_errno(void); #else -extern int *__h_errno(); + extern int *__h_errno(); #endif /* __STDC__ */ -/* Only #define h_errno if there is no conflict with other use */ + /* Only #define h_errno if there is no conflict with other use */ #ifdef H_ERRNO_IS_FUNCTION #define h_errno (*__h_errno()) #endif /* NO_H_ERRNO_DEFINE */ #endif /* _REENTRANT */ -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in extern int h_errno). - */ + /* + * Error return codes from gethostbyname() and gethostbyaddr() + * (left in extern int h_errno). + */ #define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */ #define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ @@ -465,10 +465,10 @@ extern int *__h_errno(); #if !defined(_XPG4_2) || defined(__EXTENSIONS__) #define NO_ADDRESS NO_DATA /* no address, look for MX record */ -/* BIND */ + /* BIND */ #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ -/* End BIND */ + /* End BIND */ #define MAXHOSTNAMELEN 256