Remove non-POSIX sys/cdefs.h dependency.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7547 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+32
-19
@@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
Modified for [Open]BeOS
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ++Copyright++ 1980, 1983, 1988, 1993
|
* ++Copyright++ 1980, 1983, 1988, 1993
|
||||||
* -
|
* -
|
||||||
@@ -86,12 +90,21 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @(#)netdb.h 8.1 (Berkeley) 6/2/93
|
* @(#)netdb.h 8.1 (Berkeley) 6/2/93
|
||||||
* $Id: netdb.h,v 1.7 2004/04/15 15:54:33 wkornew Exp $
|
* $Id: netdb.h,v 1.8 2004/05/13 00:48:55 phoudoin Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Modified for OpenBeOS
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _NETDB_H_
|
#ifndef _NETDB_H_
|
||||||
#define _NETDB_H_
|
#define _NETDB_H_
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if (!defined(BSD)) || (BSD < 199306)
|
#if (!defined(BSD)) || (BSD < 199306)
|
||||||
@@ -101,6 +114,12 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#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"
|
||||||
@@ -118,9 +137,7 @@
|
|||||||
#define _PATH_SERVICES "/etc/services"
|
#define _PATH_SERVICES "/etc/services"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
extern int * __h_errno (void);
|
||||||
extern int * __h_errno __P((void));
|
|
||||||
__END_DECLS
|
|
||||||
#define h_errno (*__h_errno())
|
#define h_errno (*__h_errno())
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -332,7 +349,8 @@ struct servent_data {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
#define __P(a) a
|
||||||
|
|
||||||
void endhostent __P((void));
|
void endhostent __P((void));
|
||||||
void endnetent __P((void));
|
void endnetent __P((void));
|
||||||
void endprotoent __P((void));
|
void endprotoent __P((void));
|
||||||
@@ -402,20 +420,15 @@ struct servent *getservbyport_r __P((int port, const char *,
|
|||||||
struct servent *getservent_r __P((struct servent *, char *, int));
|
struct servent *getservent_r __P((struct servent *, char *, int));
|
||||||
void setservent_r __P((int));
|
void setservent_r __P((int));
|
||||||
void endservent_r __P((void));
|
void endservent_r __P((void));
|
||||||
__END_DECLS
|
|
||||||
|
|
||||||
/* This is nec'y to make this include file properly replace the sun version. */
|
|
||||||
#ifdef sun
|
/* BeOS specific, because of lack of UNIX passwd functions */
|
||||||
#ifdef __GNU_LIBRARY__
|
int getusername(char *username, unsigned userlen);
|
||||||
#include <rpc/netdb.h>
|
int getpassword(char *password, unsigned passlen);
|
||||||
#else
|
|
||||||
struct rpcent {
|
|
||||||
char *r_name; /* name of server for this rpc program */
|
#ifdef __cplusplus
|
||||||
char **r_aliases; /* alias list */
|
}
|
||||||
int r_number; /* rpc program number */
|
#endif
|
||||||
};
|
|
||||||
struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
|
|
||||||
#endif /* __GNU_LIBRARY__ */
|
|
||||||
#endif /* sun */
|
|
||||||
|
|
||||||
#endif /* !_NETDB_H_ */
|
#endif /* !_NETDB_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user