Updated DEVNOTES. It's finally complete, now.
Fixed headers: - added checks for C++ - removed _REENTRANT checks git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15572 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -88,6 +88,10 @@
|
|||||||
#define inet_nsap_addr __inet_nsap_addr
|
#define inet_nsap_addr __inet_nsap_addr
|
||||||
#define inet_nsap_ntoa __inet_nsap_ntoa
|
#define inet_nsap_ntoa __inet_nsap_ntoa
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
unsigned long inet_addr __P((const char *));
|
unsigned long inet_addr __P((const char *));
|
||||||
int inet_aton __P((const char *, struct in_addr *));
|
int inet_aton __P((const char *, struct in_addr *));
|
||||||
@@ -107,6 +111,10 @@ u_int inet_nsap_addr __P((const char *, u_char *, int));
|
|||||||
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||||
/*
|
/*
|
||||||
* Macros for number representation conversion.
|
* Macros for number representation conversion.
|
||||||
|
|||||||
@@ -102,6 +102,10 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _PATH_HEQUIV
|
#ifndef _PATH_HEQUIV
|
||||||
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||||
#endif
|
#endif
|
||||||
@@ -124,12 +128,7 @@
|
|||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern int * __h_errno __P((void));
|
extern int * __h_errno __P((void));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#if defined(_REENTRANT) || \
|
|
||||||
(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
|
||||||
#define h_errno (*__h_errno())
|
#define h_errno (*__h_errno())
|
||||||
#else
|
|
||||||
extern int h_errno;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structures returned by network data base library. All addresses are
|
* Structures returned by network data base library. All addresses are
|
||||||
@@ -262,7 +261,6 @@ struct addrinfo {
|
|||||||
#define SCOPE_DELIMITER '%'
|
#define SCOPE_DELIMITER '%'
|
||||||
|
|
||||||
|
|
||||||
#ifdef _REENTRANT
|
|
||||||
#if defined (__hpux) || defined(__osf__) || defined(_AIX)
|
#if defined (__hpux) || defined(__osf__) || defined(_AIX)
|
||||||
#define _MAXALIASES 35
|
#define _MAXALIASES 35
|
||||||
#define _MAXLINELEN 1024
|
#define _MAXLINELEN 1024
|
||||||
@@ -352,7 +350,7 @@ struct servent_data {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
void endhostent __P((void));
|
void endhostent __P((void));
|
||||||
void endnetent __P((void));
|
void endnetent __P((void));
|
||||||
@@ -399,7 +397,6 @@ int innetgr __P((const char *, const char *, const char *,
|
|||||||
const char *));
|
const char *));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _REENTRANT
|
|
||||||
#if defined(__hpux) || defined(__osf__) || defined(_AIX)
|
#if defined(__hpux) || defined(__osf__) || defined(_AIX)
|
||||||
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||||
struct hostent_data *));
|
struct hostent_data *));
|
||||||
@@ -532,6 +529,9 @@ int setnetgrent_r __P((char *, void **));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <arpa/nameser.h>
|
#include <arpa/nameser.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Revision information. This is the release date in YYYYMMDD format.
|
* Revision information. This is the release date in YYYYMMDD format.
|
||||||
* It can change every day so the right thing to do with it is use it
|
* It can change every day so the right thing to do with it is use it
|
||||||
@@ -285,16 +289,10 @@ union res_sockaddr_union {
|
|||||||
/* 0x00010000 */
|
/* 0x00010000 */
|
||||||
|
|
||||||
/* Things involving an internal (static) resolver context. */
|
/* Things involving an internal (static) resolver context. */
|
||||||
#ifdef _REENTRANT
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
extern struct __res_state *__res_state(void);
|
extern struct __res_state *__res_state(void);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#define _res (*__res_state())
|
#define _res (*__res_state())
|
||||||
#else
|
|
||||||
#ifndef __BIND_NOSTATIC
|
|
||||||
extern struct __res_state _res;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __BIND_NOSTATIC
|
#ifndef __BIND_NOSTATIC
|
||||||
#define fp_nquery __fp_nquery
|
#define fp_nquery __fp_nquery
|
||||||
@@ -498,4 +496,8 @@ int res_getservers __P((res_state,
|
|||||||
union res_sockaddr_union *, int));
|
union res_sockaddr_union *, int));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !_RESOLV_H_ */
|
#endif /* !_RESOLV_H_ */
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ ported to Haiku
|
|||||||
This file contains important information for developers who want to update this BIND port.
|
This file contains important information for developers who want to update this BIND port.
|
||||||
I created config.h, port_before.h, and port_after.h with "configure --enable-threads --disable-ipv6" on a BONE-compatible system and fixed some mistakes that the script made. All changes to these three files are marked with a comment containing the keyword CHANGED.
|
I created config.h, port_before.h, and port_after.h with "configure --enable-threads --disable-ipv6" on a BONE-compatible system and fixed some mistakes that the script made. All changes to these three files are marked with a comment containing the keyword CHANGED.
|
||||||
|
|
||||||
Our private folder are:
|
Added folders and files:
|
||||||
headers (some headers are not defined in Haiku)
|
headers (some headers are not defined in Haiku)
|
||||||
src (functions that are not part of Haiku, e.g.: strsep)
|
src (functions that are not part of Haiku, e.g.: strsep)
|
||||||
|
|
||||||
|
All BIND headers were moved to legacy/network (public) and private/net (private) in the system-wide headers folder.
|
||||||
|
|
||||||
Porting issues:
|
Porting issues:
|
||||||
BIND wants to include sys/un.h and utmp.h. We do not have these, so I put empty headers into the private headers folder.
|
BIND wants to include sys/un.h and utmp.h. We do not have these, so I put empty headers into the private headers folder.
|
||||||
|
|
||||||
@@ -19,4 +21,6 @@ Added sources for compatibility:
|
|||||||
Changes made to the sources and headers:
|
Changes made to the sources and headers:
|
||||||
nameser_compat.h: added check for __HAIKU__ and __BEOS__ to not redefine endianness
|
nameser_compat.h: added check for __HAIKU__ and __BEOS__ to not redefine endianness
|
||||||
|
|
||||||
irs/gai_strerror and irs/irs_data.c: Changed the initialization of the mutex lock and rewrote two functions to use BeOS-native TLS.
|
arpa/inet.h, netdb.h, resolv.h: added check for __cplusplus, removed check for _REENTRANT (we are always reentrant)
|
||||||
|
|
||||||
|
irs/gai_strerror.c, irs/irs_data.c: Changed the initialization of the mutex lock and switched to BeOS-native TLS in gai_strerror() and net_data_init().
|
||||||
|
|||||||
Reference in New Issue
Block a user