mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
New my_gethostbyname_r() handling
Changed some status variable names Fix bug in GRANT ... PASSWORD string
This commit is contained in:
@ -36,6 +36,42 @@ extern "C" {
|
||||
|
||||
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 */
|
||||
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
|
||||
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
|
||||
#endif /* defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */
|
||||
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT)
|
||||
#define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data)
|
||||
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) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user