summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/my_net.h36
-rw-r--r--include/my_pthread.h25
-rw-r--r--include/mysqld_error.h2
3 files changed, 37 insertions, 26 deletions
diff --git a/include/my_net.h b/include/my_net.h
index c2ebe80a343..79ddc7d08f6 100644
--- a/include/my_net.h
+++ b/include/my_net.h
@@ -67,5 +67,41 @@ C_MODE_START
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) */
+
C_MODE_END
#endif
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 79dd87cf9bb..62088fc56cb 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -426,31 +426,6 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
#define HAVE_PTHREAD_KILL
#endif
-#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);
-#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) */
-
-#else
-#ifdef 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);
-#else
-#define GETHOSTBYNAME_BUFF_SIZE 2048
-#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
-#endif /* HAVE_GETHOSTBYNAME_R_RETURN_INT */
-#endif /* defined(HAVE_PTHREAD_ATTR_CREATE) || defined(_AIX) || defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */
-
#endif /* defined(__WIN__) */
#if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
diff --git a/include/mysqld_error.h b/include/mysqld_error.h
index c910078331e..06378fa60c0 100644
--- a/include/mysqld_error.h
+++ b/include/mysqld_error.h
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* Definefile for errormessagenumbers */
+/* Definefile for error messagenumbers */
#define ER_HASHCHK 1000
#define ER_NISAMCHK 1001