diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-10-25 06:53:38 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:43:29 +0100 |
commit | 88f6c5a1d2c337ffe7505e20b96a6b47dab1c063 (patch) | |
tree | 4ad31b42c6255c63cb0df157f6d64c78ffdde3e5 /source4/lib/replace/getaddrinfo.h | |
parent | 1f680ef45d8ff95aca2834cd9005f03409019efd (diff) | |
download | samba-88f6c5a1d2c337ffe7505e20b96a6b47dab1c063.tar.gz samba-88f6c5a1d2c337ffe7505e20b96a6b47dab1c063.tar.bz2 samba-88f6c5a1d2c337ffe7505e20b96a6b47dab1c063.zip |
r25724: - include getaddrinfo.h after we have defined struct addrinfo
- use rep_ instead of pg_ as prefix in getaddrinfo.[ch]
- define HAVE_<name> macros when we replace functions
metze
(This used to be commit 57d5cf4b5fe8885b1375059aa143c9c71d2503b4)
Diffstat (limited to 'source4/lib/replace/getaddrinfo.h')
-rw-r--r-- | source4/lib/replace/getaddrinfo.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/source4/lib/replace/getaddrinfo.h b/source4/lib/replace/getaddrinfo.h index 47a62eb8b2..dddd699b62 100644 --- a/source4/lib/replace/getaddrinfo.h +++ b/source4/lib/replace/getaddrinfo.h @@ -37,6 +37,9 @@ TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * struct definitions needed to call it. To avoid conflict with the libbind * definition in such cases, we rename our routines to pg_xxx() via macros. * + +in lib/replace we use rep_xxx() + * This code will also work on platforms where struct addrinfo is defined * in the system headers but no getaddrinfo() can be located. * @@ -53,28 +56,32 @@ TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. #ifdef getaddrinfo #undef getaddrinfo #endif -#define getaddrinfo pg_getaddrinfo +#define getaddrinfo rep_getaddrinfo +#define HAVE_GETADDRINFO #ifdef freeaddrinfo #undef freeaddrinfo #endif -#define freeaddrinfo pg_freeaddrinfo +#define freeaddrinfo rep_freeaddrinfo +#define HAVE_FREEADDRINFO #ifdef gai_strerror #undef gai_strerror #endif -#define gai_strerror pg_gai_strerror +#define gai_strerror rep_gai_strerror +#define HAVE_GAI_STRERROR #ifdef getnameinfo #undef getnameinfo #endif -#define getnameinfo pg_getnameinfo +#define getnameinfo rep_getnameinfo +#define HAVE_GETNAMEINFO -extern int getaddrinfo(const char *node, const char *service, +extern int rep_getaddrinfo(const char *node, const char *service, const struct addrinfo * hints, struct addrinfo ** res); -extern void freeaddrinfo(struct addrinfo * res); -extern const char *gai_strerror(int errcode); -extern int getnameinfo(const struct sockaddr * sa, socklen_t salen, +extern void rep_freeaddrinfo(struct addrinfo * res); +extern const char *rep_gai_strerror(int errcode); +extern int rep_getnameinfo(const struct sockaddr * sa, socklen_t salen, char *node, size_t nodelen, char *service, size_t servicelen, int flags); #endif /* HAVE_GETADDRINFO */ |