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
+2 -5
View File
@@ -16,9 +16,6 @@
#include <TLS.h> #include <TLS.h>
extern int h_errno;
#undef h_errno
// was defined by netdb.h
static int32 h_errno_tls; static int32 h_errno_tls;
void initialize_before(void); void initialize_before(void);
@@ -70,9 +67,9 @@ _EXPORT void herror(const char *error)
printf("herror() not yet supported."); 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);
} }
-4
View File
@@ -96,10 +96,6 @@
*/ */
#include <stdarg.h> #include <stdarg.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
#ifdef YP #ifdef YP
#include <rpc/rpc.h> #include <rpc/rpc.h>
#include <rpcsvc/yp.h> #include <rpcsvc/yp.h>
-2
View File
@@ -127,8 +127,6 @@ typedef union {
static struct hostent *getanswer (const querybuf *, int, const char *, int); static struct hostent *getanswer (const querybuf *, int, const char *, int);
extern int h_errno;
int int
_hokchar(p) _hokchar(p)
const char *p; const char *p;
-4
View File
@@ -52,10 +52,6 @@
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
static const struct afd { static const struct afd {
int a_af; int a_af;
int a_addrlen; int a_addrlen;
-4
View File
@@ -83,10 +83,6 @@
#include <errno.h> #include <errno.h>
#include <string.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 *_getnetbyaddr (in_addr_t net, int type);
struct netent *_getnetbyname (const char *name); struct netent *_getnetbyname (const char *name);
-4
View File
@@ -91,10 +91,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.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_opcodes[];
extern const char *_res_resultcodes[]; extern const char *_res_resultcodes[];
-4
View File
@@ -64,10 +64,6 @@
#include <resolv.h> #include <resolv.h>
#include <string.h> #include <string.h>
#undef h_errno
// was defined by netdb.h
extern int h_errno;
/* /*
* Form all types of queries. * Form all types of queries.
* Returns the size of the result or -1. * Returns the size of the result or -1.
+1 -3
View File
@@ -75,9 +75,7 @@
#endif #endif
const char *hostalias (const char *); 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); extern int res_opt (int, u_char *, int, int);
/* /*