summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2009-03-14 20:04:28 +0000
committerdas <das@FreeBSD.org>2009-03-14 20:04:28 +0000
commit835b4065deb1844dbbb0bc07994122bd9a049e68 (patch)
treeb244aedc19f8fab92e4c90edf1ec4d50d5623d74 /include
parent8283ef5f39eca1260e567a10c479cd3f88a70158 (diff)
downloadFreeBSD-src-835b4065deb1844dbbb0bc07994122bd9a049e68.zip
FreeBSD-src-835b4065deb1844dbbb0bc07994122bd9a049e68.tar.gz
Hide numerous BSD extensions in the POSIX namespace.
Diffstat (limited to 'include')
-rw-r--r--include/netdb.h54
1 files changed, 30 insertions, 24 deletions
diff --git a/include/netdb.h b/include/netdb.h
index cd7fc74..1c9ef27 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -217,67 +217,73 @@ struct addrinfo {
__BEGIN_DECLS
void endhostent(void);
void endnetent(void);
-void endnetgrent(void);
void endprotoent(void);
void endservent(void);
-void freehostent(struct hostent *);
+#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112)
struct hostent *gethostbyaddr(const void *, socklen_t, int);
+struct hostent *gethostbyname(const char *);
+#endif
+struct hostent *gethostent(void);
+struct netent *getnetbyaddr(uint32_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);
+void sethostent(int);
+/* void sethostfile(const char *); */
+void setnetent(int);
+void setprotoent(int);
+int getaddrinfo(const char *, const char *,
+ const struct addrinfo *, struct addrinfo **);
+int getnameinfo(const struct sockaddr *, socklen_t, char *,
+ size_t, char *, size_t, int);
+void freeaddrinfo(struct addrinfo *);
+const char *gai_strerror(int);
+void setservent(int);
+
+#if __BSD_VISIBLE
+void endnetgrent(void);
+void freehostent(struct hostent *);
int gethostbyaddr_r(const void *, socklen_t, int, struct hostent *,
char *, size_t, struct hostent **, int *);
-struct hostent *gethostbyname(const char *);
int gethostbyname_r(const char *, struct hostent *, char *, size_t,
struct hostent **, int *);
struct hostent *gethostbyname2(const char *, int);
int gethostbyname2_r(const char *, int, struct hostent *, char *,
size_t, struct hostent **, int *);
-struct hostent *gethostent(void);
int gethostent_r(struct hostent *, char *, size_t,
struct hostent **, int *);
struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
struct hostent *getipnodebyname(const char *, int, int, int *);
-struct netent *getnetbyaddr(uint32_t, int);
int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t,
struct netent**, int *);
-struct netent *getnetbyname(const char *);
int getnetbyname_r(const char *, struct netent *, char *, size_t,
struct netent **, int *);
-struct netent *getnetent(void);
int getnetent_r(struct netent *, char *, size_t, struct netent **,
int *);
int getnetgrent(char **, char **, char **);
-struct protoent *getprotobyname(const char *);
int getprotobyname_r(const char *, struct protoent *, char *,
size_t, struct protoent **);
-struct protoent *getprotobynumber(int);
int getprotobynumber_r(int, struct protoent *, char *, size_t,
struct protoent **);
-struct protoent *getprotoent(void);
int getprotoent_r(struct protoent *, char *, size_t,
struct protoent **);
-struct servent *getservbyname(const char *, const char *);
int getservbyname_r(const char *, const char *, struct servent *,
char *, size_t, struct servent **);
-struct servent *getservbyport(int, const char *);
int getservbyport_r(int, const char *, struct servent *, char *,
size_t, struct servent **);
-struct servent *getservent(void);
int getservent_r(struct servent *, char *, size_t,
struct servent **);
void herror(const char *);
__const char *hstrerror(int);
int innetgr(const char *, const char *, const char *, const char *);
-void sethostent(int);
-/* void sethostfile(const char *); */
-void setnetent(int);
-void setprotoent(int);
-int getaddrinfo(const char *, const char *,
- const struct addrinfo *, struct addrinfo **);
-int getnameinfo(const struct sockaddr *, socklen_t, char *,
- size_t, char *, size_t, int);
-void freeaddrinfo(struct addrinfo *);
-const char *gai_strerror(int);
void setnetgrent(const char *);
-void setservent(int);
+#endif
+
/*
* PRIVATE functions specific to the FreeBSD implementation
OpenPOWER on IntegriCloud