diff options
author | unknown <monty@narttu.> | 2002-05-27 09:29:26 +0300 |
---|---|---|
committer | unknown <monty@narttu.> | 2002-05-27 09:29:26 +0300 |
commit | e3b5fd8696a36d06bd9993edd16ca7d51955bf15 (patch) | |
tree | f263599524d17ecb5af26db595094ba4b116a579 /include/my_net.h | |
parent | af68d3de879a94b2be47ed5e335d5c072692ea2b (diff) | |
download | mariadb-git-e3b5fd8696a36d06bd9993edd16ca7d51955bf15.tar.gz |
Portability fix for OSF1
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'include/my_net.h')
-rw-r--r-- | include/my_net.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/my_net.h b/include/my_net.h index e3db765cff7..e06a1142418 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -40,19 +40,22 @@ void my_inet_ntoa(struct in_addr in, char *buf); Handling of gethostbyname_r() */ -#if defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) #if !defined(HPUX) struct hostent; #endif /* HPUX */ +#if !defined(HAVE_GETHOSTBYNAME_R) +struct hostent *my_gethostbyname_r(const char *name, + struct hostent *result, char *buffer, + int buflen, int *h_errnop); +void my_gethostbyname_r_free(); +#elif defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) struct hostent *my_gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); #define my_gethostbyname_r_free() -#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -#else +#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) -#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ +#endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ #elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) @@ -60,17 +63,14 @@ struct hostent *my_gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); #define my_gethostbyname_r_free() -#elif !defined(HAVE_GETHOSTBYNAME_R) -#define GETHOSTBYNAME_BUFF_SIZE 2048 -struct hostent *my_gethostbyname_r(const char *name, - struct hostent *result, char *buffer, - int buflen, int *h_errnop); -void my_gethostbyname_r_free(); #else -#define GETHOSTBYNAME_BUFF_SIZE 2048 #define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E)) #define my_gethostbyname_r_free() -#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ +#endif /* !defined(HAVE_GETHOSTBYNAME_R) */ + +#ifndef GETHOSTBYNAME_BUFF_SIZE +#define GETHOSTBYNAME_BUFF_SIZE 2048 +#endif #ifdef __cplusplus } |