Removing #undef h_errno and extern int h_errno declaration, as we must

use all the same netdb.h definition, which in turn use TLS to support
a thread-safe h_errno global variable...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6473 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2004-02-03 00:01:00 +00:00
parent f29673f8ae
commit a1219cfa33
8 changed files with 3 additions and 30 deletions

View File

@ -16,9 +16,6 @@
#include <TLS.h>
extern int h_errno;
#undef h_errno
// was defined by netdb.h
static int32 h_errno_tls;
void initialize_before(void);
@ -70,9 +67,9 @@ _EXPORT void herror(const char *error)
printf("herror() not yet supported.");
}
_EXPORT int *_h_errnop()
_EXPORT int * _h_errnop()
{
return (int *)tls_address(h_errno_tls);
return (int *) tls_address(h_errno_tls);
}

View File

@ -96,10 +96,6 @@
*/
#include <stdarg.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
#ifdef YP
#include <rpc/rpc.h>
#include <rpcsvc/yp.h>

View File

@ -127,8 +127,6 @@ typedef union {
static struct hostent *getanswer (const querybuf *, int, const char *, int);
extern int h_errno;
int
_hokchar(p)
const char *p;

View File

@ -52,10 +52,6 @@
#include <string.h>
#include <stddef.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
static const struct afd {
int a_af;
int a_addrlen;

View File

@ -83,10 +83,6 @@
#include <errno.h>
#include <string.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
struct netent *_getnetbyaddr (in_addr_t net, int type);
struct netent *_getnetbyname (const char *name);

View File

@ -91,10 +91,6 @@
#include <stdlib.h>
#include <string.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
extern const char *_res_opcodes[];
extern const char *_res_resultcodes[];

View File

@ -64,10 +64,6 @@
#include <resolv.h>
#include <string.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
/*
* Form all types of queries.
* Returns the size of the result or -1.

View File

@ -75,9 +75,7 @@
#endif
const char *hostalias (const char *);
#undef h_errno
// was defined by netdb.h
int h_errno = 0;
extern int res_opt (int, u_char *, int, int);
/*