summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-16 16:32:51 +0300
commitd2b95cd7ab5b3ed450af572e9c77cd11d3c420ba (patch)
tree145820cb9685468167f09ba07a59a1f61ca640cf /mysys/my_pthread.c
parenteba5ec8b4bceabab302462db850882f715a7b040 (diff)
downloadmariadb-git-d2b95cd7ab5b3ed450af572e9c77cd11d3c420ba.tar.gz
New my_gethostbyname_r() handling
Changed some status variable names Fix bug in GRANT ... PASSWORD string Docs/manual.texi: Update of variable names include/my_net.h: New my_gethostbyname_r() handling include/my_pthread.h: New my_gethostbyname_r() handling libmysql/Makefile.shared: New my_gethostbyname_r() handling libmysql/libmysql.c: New my_gethostbyname_r() handling mysys/Makefile.am: New my_gethostbyname_r() handling mysys/my_pthread.c: New my_gethostbyname_r() handling mysys/my_thr_init.c: New my_gethostbyname_r() handling sql/hostname.cc: New my_gethostbyname_r() handling sql/mini_client.cc: New my_gethostbyname_r() handling sql/mysqld.cc: change some status variable names sql/sql_acl.cc: Fix bug in GRANT ... PASSWORD string
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 72409b6aa86..706712086c6 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -23,9 +23,6 @@
#include <m_string.h>
#include <thr_alarm.h>
#include <assert.h>
-#if !defined(MSDOS) && !defined(__WIN__)
-#include <netdb.h>
-#endif
#if (defined(__BSD__) || defined(_BSDI_VERSION)) && !defined(HAVE_mit_thread)
#define SCHED_POLICY SCHED_RR
@@ -424,57 +421,6 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond,
}
#endif /* HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT */
-/*
- Emulate SOLARIS style calls, not because it's better, but just to make the
- usage of getbostbyname_r simpler.
-*/
-
-#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)
-
-#if defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE)
-
-struct hostent *my_gethostbyname_r(const char *name,
- struct hostent *result, char *buffer,
- int buflen, int *h_errnop)
-{
- struct hostent *hp;
- dbug_assert((size_t) buflen >= sizeof(*result));
- if (gethostbyname_r(name,result, buffer, (size_t) buflen, &hp, h_errnop))
- return 0;
- return hp;
-}
-
-#elif defined(HAVE_GETHOSTBYNAME_R_RETURN_INT)
-
-struct hostent *my_gethostbyname_r(const char *name,
- struct hostent *result, char *buffer,
- int buflen, int *h_errnop)
-{
- dbug_assert(buflen >= sizeof(struct hostent_data));
- if (gethostbyname_r(name,result,(struct hostent_data *) buffer) == -1)
- {
- *h_errnop= errno;
- return 0;
- }
- return result;
-}
-
-#else
-
-struct hostent *my_gethostbyname_r(const char *name,
- struct hostent *result, char *buffer,
- int buflen, int *h_errnop)
-{
- struct hostent *hp;
- dbug_assert(buflen >= sizeof(struct hostent_data));
- hp= gethostbyname_r(name,result,(struct hostent_data *) buffer);
- *h_errnop= errno;
- return hp;
-}
-
-#endif /* GLIBC2_STYLE_GETHOSTBYNAME_R */
-#endif
-
/* Some help functions */