Add a new feature-test macro, _NETBSD_SOURCE. If this is defined

by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
This commit is contained in:
bjh21 2003-04-28 23:16:11 +00:00
parent 4fc5083af1
commit 4be7a2dcf3
113 changed files with 838 additions and 726 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet.h,v 1.12 2002/05/14 18:57:31 kleink Exp $ */
/* $NetBSD: inet.h,v 1.13 2003/04/28 23:16:16 bjh21 Exp $ */
/*
* ++Copyright++ 1983, 1993
@ -60,6 +60,8 @@
#ifndef _ARPA_INET_H_
#define _ARPA_INET_H_
#include <sys/featuretest.h>
/* External definitions for functions in inet(3) */
#include <sys/param.h>
@ -73,12 +75,12 @@
#include <sys/ansi.h>
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
#ifndef socklen_t
typedef __socklen_t socklen_t;
#define socklen_t __socklen_t
#endif
#endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE 0) >= 500 */
#endif /* (_XOPEN_SOURCE 0) >= 500 || _NETBSD_SOURCE*/
__BEGIN_DECLS
unsigned long inet_addr __P((const char *));
@ -87,11 +89,11 @@ struct in_addr inet_makeaddr __P((u_long , u_long));
unsigned long inet_netof __P((struct in_addr));
unsigned long inet_network __P((const char *));
char *inet_ntoa __P((struct in_addr));
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
const char *inet_ntop __P((int, const void *, char *, socklen_t));
int inet_pton __P((int, const char *, void *));
#endif
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int inet_aton __P((const char *, struct in_addr *));
char * inet_neta __P((u_long, char *, size_t));
char *inet_net_ntop __P((int, const void *, int, char *, size_t));

View File

@ -1,4 +1,4 @@
/* $NetBSD: ctype.h,v 1.21 2001/04/18 01:45:18 thorpej Exp $ */
/* $NetBSD: ctype.h,v 1.22 2003/04/28 23:16:12 bjh21 Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@ -76,16 +76,14 @@ int isxdigit __P ((int));
int tolower __P ((int));
int toupper __P ((int));
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
int isascii __P ((int));
int toascii __P ((int));
int _tolower __P ((int));
int _toupper __P ((int));
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int isblank __P ((int));
#endif
__END_DECLS
@ -104,16 +102,14 @@ __END_DECLS
#define tolower(c) ((int)((_tolower_tab_ + 1)[(int)(c)]))
#define toupper(c) ((int)((_toupper_tab_ + 1)[(int)(c)]))
#if !defined(_ANSI_SOURCE) && !defined (_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define isascii(c) ((unsigned)(c) <= 0177)
#define toascii(c) ((c) & 0177)
#define _tolower(c) ((c) - 'A' + 'a')
#define _toupper(c) ((c) - 'a' + 'A')
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#if notyet
/*
* isblank() is implemented as C function, due to insufficient bitwidth in

View File

@ -1,4 +1,4 @@
/* $NetBSD: dirent.h,v 1.17 2000/04/16 14:43:56 mrg Exp $ */
/* $NetBSD: dirent.h,v 1.18 2003/04/28 23:16:12 bjh21 Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -47,7 +47,7 @@
*/
#include <sys/dirent.h>
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define d_ino d_fileno /* backward compatibility */
#endif
@ -91,11 +91,11 @@ int closedir __P((DIR *));
DIR *opendir __P((const char *));
struct dirent *readdir __P((DIR *));
void rewinddir __P((DIR *));
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
void seekdir __P((DIR *, long));
long telldir __P((const DIR *));
#endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#endif /* defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) */
#if defined(_NETBSD_SOURCE)
DIR *__opendir2 __P((const char *, int));
void __seekdir __P((DIR *, long));
int scandir __P((const char *, struct dirent ***,
@ -103,7 +103,7 @@ int scandir __P((const char *, struct dirent ***,
int alphasort __P((const void *, const void *));
int getdirentries __P((int, char *, int, long *));
int getdents __P((int, char *, size_t));
#endif /* !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */
#endif /* defined(_NETBSD_SOURCE) */
__END_DECLS
#endif /* !_KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dlfcn.h,v 1.13 2000/06/13 01:21:53 simonb Exp $ */
/* $NetBSD: dlfcn.h,v 1.14 2003/04/28 23:16:13 bjh21 Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -39,16 +39,17 @@
#ifndef _DLFCN_H_
#define _DLFCN_H_
#include <sys/featuretest.h>
#include <sys/cdefs.h>
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef struct _dl_info {
const char *dli_fname; /* File defining the symbol */
void *dli_fbase; /* Base address */
const char *dli_sname; /* Symbol name */
const void *dli_saddr; /* Symbol address */
} Dl_info;
#endif /* !defined(_XOPEN_SOURCE) */
#endif /* defined(_NETBSD_SOURCE) */
/*
* User interface to the run-time linker.
@ -57,7 +58,7 @@ __BEGIN_DECLS
void *dlopen __P((const char *, int));
int dlclose __P((void *));
void *dlsym __P((void *, const char *));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int dladdr __P((const void *, Dl_info *));
int dlctl __P((void *, int, void *));
#endif
@ -69,14 +70,14 @@ __END_DECLS
#define RTLD_NOW 2
#define RTLD_GLOBAL 0x100 /* Allow global searches in object */
#define RTLD_LOCAL 0x200
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define DL_LAZY RTLD_LAZY /* Compat */
#endif
/*
* dlctl() commands
*/
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define DL_GETERRNO 1
#define DL_GETSYMBOL 2
#if 0
@ -85,6 +86,6 @@ __END_DECLS
#define DL_GETREFCNT x
#define DL_GETLOADADDR x
#endif /* 0 */
#endif /* !defined(_XOPEN_SOURCE) */
#endif /* defined(_NETBSD_SOURCE) */
#endif /* !defined(_DLFCN_H_) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: errno.h,v 1.4 2000/12/18 21:22:00 christos Exp $ */
/* $NetBSD: errno.h,v 1.5 2003/04/28 23:16:13 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -53,8 +53,7 @@ int *__errno __P((void));
#define errno (*__errno())
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
extern __const int sys_nerr __RENAME(__sys_nerr14);
extern __const char *__const *sys_errlist __RENAME(__sys_errlist14);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: fnmatch.h,v 1.9 2002/10/06 03:15:45 provos Exp $ */
/* $NetBSD: fnmatch.h,v 1.10 2003/04/28 23:16:13 bjh21 Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -46,7 +46,7 @@
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */
#define FNM_LEADING_DIR 0x10 /* Ignore /<tail> after Imatch. */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
/* $NetBSD: getopt.h,v 1.5 2003/04/28 23:16:13 bjh21 Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -40,12 +40,13 @@
#define _GETOPT_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <unistd.h>
/*
* Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
*/
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define no_argument 0
#define required_argument 1
#define optional_argument 2

View File

@ -1,4 +1,4 @@
/* $NetBSD: glob.h,v 1.15 2001/10/28 05:12:31 kleink Exp $ */
/* $NetBSD: glob.h,v 1.16 2003/04/28 23:16:13 bjh21 Exp $ */
/*
* Copyright (c) 1989, 1993
@ -85,7 +85,7 @@ typedef struct {
#define GLOB_NOMATCH (-3) /* No match, and GLOB_NOCHECK was not set. */
#define GLOB_NOSYS (-4) /* Implementation does not support function. */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grp.h,v 1.16 2002/01/27 07:00:43 lukem Exp $ */
/* $NetBSD: grp.h,v 1.17 2003/04/28 23:16:13 bjh21 Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -47,7 +47,7 @@
#include <sys/featuretest.h>
#include <sys/types.h>
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define _PATH_GROUP "/etc/group"
#endif
@ -61,12 +61,12 @@ struct group {
__BEGIN_DECLS
struct group *getgrgid __P((gid_t));
struct group *getgrnam __P((const char *));
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
struct group *getgrent __P((void));
void setgrent __P((void));
void endgrent __P((void));
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
void setgrfile __P((const char *));
int setgroupent __P((int));
const char *group_from_gid __P((gid_t, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.19 2003/01/18 17:12:13 christos Exp $ */
/* $NetBSD: limits.h,v 1.20 2003/04/28 23:16:13 bjh21 Exp $ */
/*
* Copyright (c) 1988, 1993
@ -38,7 +38,10 @@
#ifndef _LIMITS_H_
#define _LIMITS_H_
#if !defined(_ANSI_SOURCE)
#include <sys/featuretest.h>
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 6
#define _POSIX_LINK_MAX 8
@ -71,8 +74,8 @@
* X/Open CAE Specifications,
* adopted in IEEE Std 1003.1-2001 XSI.
*/
#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE - 0) >= 200112L || \
defined(_XOPEN_SOURCE)
#if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define _XOPEN_IOV_MAX 16
#define _XOPEN_NAME_MAX 256
#define _XOPEN_PATH_MAX 1024
@ -91,9 +94,9 @@
#ifndef TMP_MAX
#define TMP_MAX 308915776 /* Legacy */
#endif
#endif /* !_POSIX_C_SOURCE || >= 200112L || _XOPEN_SOURCE */
#endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#include <machine/limits.h>
#include <sys/syslimits.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: math.h,v 1.24 2002/02/19 13:08:12 simonb Exp $ */
/* $NetBSD: math.h,v 1.25 2003/04/28 23:16:13 bjh21 Exp $ */
/*
* ====================================================
@ -44,8 +44,8 @@ extern __const union __double_u __infinity;
*/
#if defined(__HAVE_NANF) && \
(!defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L))
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)))
extern __const union __float_u __nanf;
#define NAN __nanf.__val
#endif /* __HAVE_NANF && (!_ANSI_SOURCE && ....) */
@ -53,8 +53,7 @@ extern __const union __float_u __nanf;
/*
* XOPEN/SVID
*/
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define M_E 2.7182818284590452354 /* e */
#define M_LOG2E 1.4426950408889634074 /* log 2e */
#define M_LOG10E 0.43429448190325182765 /* log 10e */
@ -71,10 +70,9 @@ extern __const union __float_u __nanf;
#define MAXFLOAT ((float)3.40282346638528860e+38)
extern int signgam;
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE || _XOPEN_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix};
#define _LIB_VERSION_TYPE enum fdversion
@ -120,7 +118,7 @@ struct exception {
#define TLOSS 5
#define PLOSS 6
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
__BEGIN_DECLS
/*
@ -153,8 +151,7 @@ double fabs __P((double));
double floor __P((double));
double fmod __P((double, double));
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
double erf __P((double));
double erfc __P((double));
double gamma __P((double));
@ -169,7 +166,7 @@ double y0 __P((double));
double y1 __P((double));
double yn __P((int, double));
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
double acosh __P((double));
double asinh __P((double));
double atanh __P((double));
@ -182,11 +179,10 @@ double nextafter __P((double, double));
double remainder __P((double, double));
double rint __P((double));
double scalb __P((double, double));
#endif /* !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500 */
#endif /* !_ANSI_SOURCE) && !_POSIX_C_SOURCE || _XOPEN_SOURCE */
#endif /* (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)*/
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifndef __cplusplus
int matherr __P((struct exception *));
#endif
@ -210,21 +206,19 @@ double cabs __P((/* struct complex { double r; double i; } */));
#endif
double drem __P((double, double));
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) || defined(_REENTRANT)
#if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
/*
* Reentrant version of gamma & lgamma; passes signgam back by reference
* as the second argument; user must allocate space for signgam.
*/
double gamma_r __P((double, int *));
double lgamma_r __P((double, int *));
#endif /* !... || _REENTRANT */
#endif /* _NETBSD_SOURCE || _REENTRANT */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int isinf __P((double));
/* float versions of ANSI/POSIX functions */
@ -302,10 +296,9 @@ float cabsf __P((/* struct complex { float r; float i; } */));
float dremf __P((float, float));
float expm1f __P((float));
float log1pf __P((float));
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) || defined(_REENTRANT)
#if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
/*
* Float versions of reentrant version of gamma & lgamma; passes
* signgam back by reference as the second argument; user must

View File

@ -1,4 +1,4 @@
/* $NetBSD: ndbm.h,v 1.8 2000/07/07 10:43:54 ad Exp $ */
/* $NetBSD: ndbm.h,v 1.9 2003/04/28 23:16:13 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -45,7 +45,7 @@
#include <sys/featuretest.h>
#include <db.h>
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/* Map dbm interface onto db(3). */
#define DBM_RDONLY O_RDONLY
#endif
@ -54,7 +54,7 @@
#define DBM_INSERT 0
#define DBM_REPLACE 1
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* The db(3) support for ndbm(3) always appends this suffix to the
* file name to avoid overwriting the user's original database.
@ -68,7 +68,7 @@ typedef struct {
} datum;
typedef DB DBM;
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
#endif
@ -77,7 +77,7 @@ void dbm_close __P((DBM *));
int dbm_delete __P((DBM *, datum));
datum dbm_fetch __P((DBM *, datum));
datum dbm_firstkey __P((DBM *));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
long dbm_forder __P((DBM *, datum));
#endif
datum dbm_nextkey __P((DBM *));
@ -85,7 +85,7 @@ DBM *dbm_open __P((const char *, int, mode_t));
int dbm_store __P((DBM *, datum, datum, int));
int dbm_error __P((DBM *));
int dbm_clearerr __P((DBM *));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int dbm_dirfno __P((DBM *));
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: netdb.h,v 1.28 2003/01/06 13:26:25 wiz Exp $ */
/* $NetBSD: netdb.h,v 1.29 2003/04/28 23:16:14 bjh21 Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -91,6 +91,7 @@
#include <machine/ansi.h>
#include <sys/ansi.h>
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <inttypes.h>
/*
@ -106,7 +107,7 @@ typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#endif
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define _PATH_HEQUIV "/etc/hosts.equiv"
#define _PATH_HOSTS "/etc/hosts"
#define _PATH_NETWORKS "/etc/networks"
@ -165,7 +166,7 @@ struct protoent {
* This should be deleted the next time the libc major number is
* incremented.
*/
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
int ai_family; /* PF_xxx */
@ -189,7 +190,7 @@ struct addrinfo {
* (left in extern int h_errno).
*/
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define NETDB_INTERNAL -1 /* see errno */
#define NETDB_SUCCESS 0 /* no problem */
#endif
@ -197,14 +198,14 @@ struct addrinfo {
#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
#define NO_DATA 4 /* Valid name, no data record of requested type */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
#endif
/*
* Error return codes from getaddrinfo()
*/
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
#define EAI_AGAIN 2 /* temporary failure in name resolution */
#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
@ -219,12 +220,12 @@ struct addrinfo {
#define EAI_BADHINTS 12
#define EAI_PROTOCOL 13
#define EAI_MAX 14
#endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */
#endif /* (_XOPEN_SOURCE - 0) >= 520 || _NETBSD_SOURCE */
/*
* Flag values for getaddrinfo()
*/
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
#define AI_PASSIVE 0x00000001 /* get address to use bind() */
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
@ -232,11 +233,11 @@ struct addrinfo {
#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
#endif
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
/*
* Constants for getnameinfo()
*/
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#endif
@ -249,33 +250,33 @@ struct addrinfo {
#define NI_NAMEREQD 0x00000004
#define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define NI_WITHSCOPEID 0x00000020 /*KAME extension*/
#endif
/*
* Scope delimit character
*/
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SCOPE_DELIMITER '%' /*KAME extension*/
#endif
#endif /* !_XOPEN_SOURCE || (_XOPEN_SOURCE - 0) >= 520 */
#endif /* (_XOPEN_SOURCE - 0) >= 520 || _NETBSD_SOURCE */
__BEGIN_DECLS
void endhostent __P((void));
void endnetent __P((void));
void endprotoent __P((void));
void endservent __P((void));
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
void freehostent __P((struct hostent *));
#endif
struct hostent *gethostbyaddr __P((const char *, socklen_t, int));
struct hostent *gethostbyname __P((const char *));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
struct hostent *gethostbyname2 __P((const char *, int));
#endif
struct hostent *gethostent __P((void));
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
#if 0 /* we do not ship these */
struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
struct hostent *getipnodebyname __P((const char *, int, int, int *));
@ -290,17 +291,17 @@ struct protoent *getprotoent __P((void));
struct servent *getservbyname __P((const char *, const char *));
struct servent *getservbyport __P((int, const char *));
struct servent *getservent __P((void));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
void herror __P((const char *));
const char *hstrerror __P((int));
#endif
void sethostent __P((int));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/* void sethostfile __P((const char *)); */
#endif
void setnetent __P((int));
void setprotoent __P((int));
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 520
#if (_XOPEN_SOURCE - 0) >= 520 || defined(_NETBSD_SOURCE)
int getaddrinfo __P((const char *, const char *,
const struct addrinfo *, struct addrinfo **));
int getnameinfo __P((const struct sockaddr *, socklen_t, char *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: pwd.h,v 1.26 2002/05/24 04:02:47 itojun Exp $ */
/* $NetBSD: pwd.h,v 1.27 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -48,7 +48,7 @@
#include <sys/featuretest.h>
#include <sys/types.h>
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_MASTERPASSWD "/etc/master.passwd"
#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
@ -100,13 +100,13 @@ struct passwd {
__BEGIN_DECLS
struct passwd *getpwuid __P((uid_t));
struct passwd *getpwnam __P((const char *));
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
struct passwd *getpwent __P((void));
void setpwent __P((void));
void endpwent __P((void));
char *bcrypt_gensalt(u_int8_t);
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int pw_scan __P((char *bp, struct passwd *pw, int *flags));
int setpassent __P((int));
const char *user_from_uid __P((uid_t, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: sched.h,v 1.2 2003/01/18 18:05:05 thorpej Exp $ */
/* $NetBSD: sched.h,v 1.3 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -40,6 +40,7 @@
#define _SCHED_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sys/sched.h>
/* Required by POSIX 1003.1, section 13.1, lines 12-13. */
@ -66,8 +67,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval);
int sched_yield(void);
__END_DECLS
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) && \
!defined(_ANSI_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Stuff that for historical reasons is in <sched.h>, but not defined
@ -79,6 +79,6 @@ pid_t clone __P((int (*)(void *), void *, int, void *));
pid_t __clone __P((int (*)(void *), void *, int, void *));
__END_DECLS
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE && !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _SCHED_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: setjmp.h,v 1.18 2000/03/07 21:12:37 jdolecek Exp $ */
/* $NetBSD: setjmp.h,v 1.19 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -52,7 +52,8 @@
#else
#endif
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
typedef long sigjmp_buf[_JBLEN + 1] _JB_ATTRIBUTES;
#endif /* not ANSI */
@ -71,20 +72,19 @@ void __siglongjmp14 __P((sigjmp_buf, int));
int setjmp __P((jmp_buf)) __RENAME(__setjmp14);
void longjmp __P((jmp_buf, int)) __RENAME(__longjmp14);
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
int sigsetjmp __P((sigjmp_buf, int)) __RENAME(__sigsetjmp14);
void siglongjmp __P((sigjmp_buf, int)) __RENAME(__siglongjmp14);
#endif /* not ANSI */
#endif /* __LIBC12_SOURCE__ */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
int _setjmp __P((jmp_buf));
void _longjmp __P((jmp_buf, int));
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
void longjmperror __P((void));
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.24 2003/02/15 21:11:49 jdolecek Exp $ */
/* $NetBSD: signal.h,v 1.25 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,14 +41,14 @@
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#include <sys/types.h>
#endif
#include <sys/signal.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
extern __const char *__const *sys_signame __RENAME(__sys_signame14);
#ifndef __SYS_SIGLIST_DECLARED
#define __SYS_SIGLIST_DECLARED
@ -143,9 +143,8 @@ sigismember(const sigset_t *set, int signo)
/*
* X/Open CAE Specification Issue 5 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
int killpg __P((pid_t, int));
int siginterrupt __P((int, int));
int sigstack __P((const struct sigstack *, struct sigstack *));
@ -155,16 +154,15 @@ int __sigaltstack14 __P((const stack_t *, stack_t *));
#else
int sigaltstack __P((const stack_t *, stack_t *)) __RENAME(__sigaltstack14);
#endif
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
/*
* X/Open CAE Specification Issue 5 Version 2; IEEE Std 1003.1-2001 (POSIX)
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 200112L || \
#if (_POSIX_C_SOURCE - 0) >= 200112L || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
int sighold __P((int));
int sigignore __P((int));
int sigpause __P((int));
@ -178,10 +176,10 @@ int sigtimedwait __P((const sigset_t * __restrict,
siginfo_t * __restrict, const struct timespec * __restrict));
int __sigtimedwait __P((const sigset_t * __restrict,
siginfo_t * __restrict, struct timespec * __restrict));
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE_EXTENDED || ... */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifndef __PSIGNAL_DECLARED
#define __PSIGNAL_DECLARED
/* also in unistd.h */
@ -196,7 +194,7 @@ int sigreturn __P((struct sigcontext *)) __RENAME(__sigreturn14);
#endif
int sigsetmask __P((int));
int sigvec __P((int, struct sigvec *, struct sigvec *));
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_ANSI_SOURCE */
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdio.h,v 1.50 2003/02/27 15:56:04 kleink Exp $ */
/* $NetBSD: stdio.h,v 1.51 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -189,7 +189,8 @@ __END_DECLS
#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define P_tmpdir "/var/tmp/"
#endif
#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
@ -276,7 +277,8 @@ __END_DECLS
/*
* IEEE Std 1003.1-90
*/
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
@ -295,9 +297,8 @@ __END_DECLS
/*
* IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
*/
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE - 0) >= 199506L || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_REENTRANT)
#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
__BEGIN_DECLS
void flockfile __P((FILE *));
int ftrylockfile __P((FILE *));
@ -307,14 +308,13 @@ int getchar_unlocked __P((void));
int putc_unlocked __P((int, FILE *));
int putchar_unlocked __P((int));
__END_DECLS
#endif /* (!_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
/*
* Functions defined in POSIX 1003.2 and XPG2 or later.
*/
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE - 0) >= 2 || \
(_XOPEN_SOURCE - 0) >= 2
#if (_POSIX_C_SOURCE - 0) >= 2 || (_XOPEN_SOURCE - 0) >= 2 || \
defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int pclose __P((FILE *));
FILE *popen __P((const char *, const char *));
@ -324,8 +324,7 @@ __END_DECLS
/*
* Functions defined in XPG4.2.
*/
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
__BEGIN_DECLS
int getw __P((FILE *));
int putw __P((int, FILE *));
@ -344,8 +343,8 @@ __END_DECLS
/*
* X/Open CAE Specification Issue 5 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_LARGEFILE_SOURCE)
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_LARGEFILE_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifndef off_t
typedef __off_t off_t;
#define off_t __off_t
@ -355,13 +354,12 @@ __BEGIN_DECLS
int fseeko __P((FILE *, off_t, int));
off_t ftello __P((FILE *));
__END_DECLS
#endif /* (!_POSIX_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE >= 500 || _LARGEFILE_SOURCE || _NETBSD_SOURCE */
/*
* Routines that are purely local.
*/
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define FPARSELN_UNESCESC 0x01
#define FPARSELN_UNESCCONT 0x02
@ -404,7 +402,7 @@ FILE *funopen __P((const void *,
__END_DECLS
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
#endif /* _NETBSD_SOURCE */
/*
* Functions internal to the implementation.
@ -459,20 +457,20 @@ static __inline int __sputc(int _c, FILE *_p) {
#define getchar() getc(stdin)
#define putchar(x) putc(x, stdout)
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#if !defined(_REENTRANT) && !defined(_PTHREADS)
#define fileno(p) __sfileno(p)
#endif /* !_REENTRANT && !_PTHREADS */
#endif /* !_ANSI_SOURCE */
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE - 0) >= 199506L || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_REENTRANT)
#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
#define getc_unlocked(fp) __sgetc(fp)
#define putc_unlocked(x, fp) __sputc(x, fp)
#define getchar_unlocked() getc_unlocked(stdin)
#define putchar_unlocked(x) putc_unlocked(x, stdout)
#endif /* (!_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _POSIX_C_SOURCE >= 199506 || _XOPEN_SOURCE >= 500 || _REENTRANT... */
#endif /* _STDIO_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdlib.h,v 1.61 2003/04/14 08:38:24 kleink Exp $ */
/* $NetBSD: stdlib.h,v 1.62 2003/04/28 23:16:14 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -41,8 +41,7 @@
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <sys/types.h> /* for quad_t, etc. */
#endif
@ -69,8 +68,8 @@ typedef struct {
} ldiv_t;
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
typedef struct {
/* LONGLONG */
long long int quot; /* quotient */
@ -79,8 +78,7 @@ typedef struct {
} lldiv_t;
#endif
#if !defined(_ANSI_SOURCE) && !defined(_ISOC99_SOURCE) && \
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef struct {
quad_t quot; /* quotient */
quad_t rem; /* remainder */
@ -139,15 +137,15 @@ int wctomb __P((char *, wchar_t));
int mbtowc __P((wchar_t * __restrict, const char * __restrict, size_t));
size_t wcstombs __P((char * __restrict, const wchar_t * __restrict, size_t));
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
/*
* IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT)
#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
int rand_r __P((unsigned int *));
#endif
@ -155,8 +153,7 @@ int rand_r __P((unsigned int *));
/*
* X/Open Portability Guide >= Issue 4
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 4
#if (_XOPEN_SOURCE - 0) >= 4 || defined(_NETBSD_SOURCE)
double drand48 __P((void));
double erand48 __P((unsigned short[3]));
long jrand48 __P((unsigned short[3]));
@ -175,9 +172,8 @@ int putenv __P((const char *));
/*
* X/Open Portability Guide >= Issue 4 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
long a64l __P((const char *));
char *l64a __P((long));
@ -204,8 +200,8 @@ void *valloc __P((size_t)); /* obsoleted by malloc() */
/*
* ISO C99
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
/* LONGLONG */
long long int atoll __P((const char *));
/* LONGLONG */
@ -223,9 +219,8 @@ unsigned long long int
/*
* The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX)
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 200112L || \
(_XOPEN_SOURCE - 0) >= 600
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \
defined(_NETBSD_SOURCE)
int setenv __P((const char *, const char *, int));
#ifdef __LIBC12_SOURCE__
void unsetenv __P((const char *));
@ -238,7 +233,7 @@ int unsetenv __P((const char *)) __RENAME(__unsetenv13);
/*
* Implementation-defined extensions
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#if defined(alloca) && (alloca == __builtin_alloca) && (__GNUC__ < 2)
void *alloca __P((int)); /* built-in for gcc */
#else
@ -295,11 +290,10 @@ int l64a_r __P((long, char *, int));
size_t shquote __P((const char *arg, char *buf, size_t bufsize));
size_t shquotev __P((int argc, char * const * argv, char *buf,
size_t bufsize));
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_ISOC99_SOURCE) && \
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
qdiv_t qdiv __P((quad_t, quad_t));
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: string.h,v 1.23 2001/03/22 07:37:04 kleink Exp $ */
/* $NetBSD: string.h,v 1.24 2003/04/28 23:16:15 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -71,26 +71,23 @@ char *strrchr __P((const char *, int));
size_t strspn __P((const char *, const char *));
char *strstr __P((const char *, const char *));
char *strtok __P((char * __restrict, const char * __restrict));
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)) || defined(_REENTRANT) || \
(_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500)
#if (_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500) || \
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
char *strtok_r __P((char *, const char *, char **));
#endif /* !defined(_ANSI_SOURCE) || defined(_REENTRANT) || ... */
#endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */
size_t strxfrm __P((char * __restrict, const char * __restrict, size_t));
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
void *memccpy __P((void *, const void *, int, size_t));
char *strdup __P((const char *));
#endif /* !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) */
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <strings.h> /* for backwards-compatibilty */
size_t strlcat __P((char *, const char *, size_t));
size_t strlcpy __P((char *, const char *, size_t));
char *strsep __P((char **, const char *));
#endif /* !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) && ... */
#endif
__END_DECLS
#endif /* !defined(_STRING_H_) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: strings.h,v 1.8 2000/01/10 16:58:38 kleink Exp $ */
/* $NetBSD: strings.h,v 1.9 2003/04/28 23:16:15 bjh21 Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@ typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#endif
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#include <sys/null.h>
#endif
@ -64,7 +64,7 @@ int strcasecmp __P((const char *, const char *));
int strncasecmp __P((const char *, const char *, size_t));
__END_DECLS
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <string.h>
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: time.h,v 1.29 2002/06/30 09:45:39 bjh21 Exp $ */
/* $NetBSD: time.h,v 1.30 2003/04/28 23:16:15 bjh21 Exp $ */
/*
* Copyright (c) 1989, 1993
@ -102,7 +102,8 @@ size_t strftime __P((char * __restrict, size_t, const char * __restrict,
const struct tm * __restrict));
time_t time __P((time_t *));
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifdef __LIBC12_SOURCE__
#define CLK_TCK 100
@ -124,8 +125,7 @@ void tzset __P((void));
/*
* X/Open Portability Guide >= Issue 4
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 4
#if (_XOPEN_SOURCE - 0) >= 4 || defined(_NETBSD_SOURCE)
extern int daylight;
#ifndef __LIBC12_SOURCE__
extern long int timezone __RENAME(__timezone13);
@ -134,8 +134,8 @@ char *strptime __P((const char * __restrict, const char * __restrict,
struct tm * __restrict));
#endif
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_NETBSD_SOURCE)
#include <sys/time.h> /* XXX for struct timespec */
struct sigevent;
struct itimerspec;
@ -149,18 +149,17 @@ int timer_getoverrun __P((timer_t));
int timer_gettime __P((timer_t, struct itimerspec *));
int timer_settime __P((timer_t, int, const struct itimerspec *,
struct itimerspec *));
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _POSIX_C_SOURCE >= 199309 || _XOPEN_SOURCE >= 500 || ... */
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT)
#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
char *asctime_r __P((const struct tm * __restrict, char * __restrict));
char *ctime_r __P((const time_t *, char *));
struct tm *gmtime_r __P((const time_t * __restrict, struct tm * __restrict));
struct tm *localtime_r __P((const time_t * __restrict, struct tm * __restrict));
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
time_t time2posix __P((time_t));
time_t posix2time __P((time_t));
time_t timegm __P((struct tm *const));
@ -171,7 +170,7 @@ char *timezone __P((int, int));
#endif
void tzsetwall __P((void));
struct tm *offtime __P((const time_t *const, const long));
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_ANSI_SOURCE */
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: unistd.h,v 1.91 2003/04/14 08:38:24 kleink Exp $ */
/* $NetBSD: unistd.h,v 1.92 2003/04/28 23:16:15 bjh21 Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -151,8 +151,8 @@ ssize_t write __P((int, const void *, size_t));
/*
* IEEE Std 1003.2-92, adopted in X/Open Portability Guide Issue 4 and later
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 2 || (_XOPEN_SOURCE - 0) >= 4
#if (_POSIX_C_SOURCE - 0) >= 2 || (_XOPEN_SOURCE - 0) >= 4 || \
defined(_NETBSD_SOURCE)
int getopt __P((int, char * const [], const char *));
extern char *optarg; /* getopt(3) external variables */
@ -164,8 +164,8 @@ extern int optopt;
/*
* The Open Group Base Specifications, Issue 6; IEEE Std 1003.1-2001 (POSIX)
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600 || \
defined(_NETBSD_SOURCE)
int setegid __P((gid_t));
int seteuid __P((uid_t));
#endif
@ -182,10 +182,9 @@ int truncate __P((const char *, off_t));
* IEEE Std 1003.1b-93,
* also found in X/Open Portability Guide >= Issue 4 Verion 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199309L || \
#if (_POSIX_C_SOURCE - 0) >= 199309L || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
int ftruncate __P((int, off_t));
#endif
#endif /* __OFF_T_SYSCALLS_DECLARED */
@ -194,8 +193,8 @@ int ftruncate __P((int, off_t));
/*
* IEEE Std 1003.1b-93, adopted in X/Open CAE Specification Issue 5 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_NETBSD_SOURCE)
int fdatasync __P((int));
int fsync __P((int));
#endif
@ -204,7 +203,7 @@ int fsync __P((int));
/*
* X/Open Portability Guide, all issues
*/
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
int chroot __P((const char *));
int nice __P((int));
#endif
@ -221,8 +220,7 @@ int rename __P((const char *, const char *)) __RENAME(__posix_rename);
/*
* X/Open Portability Guide >= Issue 4
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 4
#if (_XOPEN_SOURCE - 0) >= 4 || defined(_NETBSD_SOURCE)
__aconst char *crypt __P((const char *, const char *));
int encrypt __P((char *, int));
char *getpass __P((const char *));
@ -233,9 +231,8 @@ pid_t getsid __P((pid_t));
/*
* X/Open Portability Guide >= Issue 4 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
#ifndef intptr_t
typedef __intptr_t intptr_t;
#define intptr_t __intptr_t
@ -292,14 +289,13 @@ char *getwd __P((char *)); /* obsoleted by getcwd() */
struct timeval; /* select(2) XXX */
#endif
int select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
#endif /* (!defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
/*
* X/Open CAE Specification Issue 5 Version 2
*/
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
ssize_t pread __P((int, void *, size_t, off_t));
ssize_t pwrite __P((int, const void *, size_t, off_t));
#endif
@ -308,7 +304,7 @@ ssize_t pwrite __P((int, const void *, size_t, off_t));
/*
* Implementation-defined extensions
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int acct __P((const char *));
int des_cipher __P((const char *, char *, long, int));
int des_setkey __P((const char *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: utmpx.h,v 1.9 2002/07/28 22:48:38 christos Exp $ */
/* $NetBSD: utmpx.h,v 1.10 2003/04/28 23:16:15 bjh21 Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -38,6 +38,7 @@
#ifndef _UTMPX_H_
#define _UTMPX_H_
#include <sys/featuretest.h>
#include <sys/socket.h>
#include <sys/time.h>
@ -51,7 +52,7 @@
#define _UTX_IDSIZE 4
#define _UTX_HOSTSIZE 256
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define UTX_USERSIZE _UTX_USERSIZE
#define UTX_LINESIZE _UTX_LINESIZE
#define UTX_IDSIZE _UTX_IDSIZE
@ -68,7 +69,7 @@
#define USER_PROCESS 7
#define DEAD_PROCESS 8
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define ACCOUNTING 9
#define SIGNATURE 10
#endif
@ -100,7 +101,7 @@ struct utmpx {
uint32_t ut_pad[10]; /* reserved for future use */
};
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
struct lastlogx {
struct timeval ll_tv; /* time entry was created */
char ll_line[_UTX_LINESIZE]; /* tty name */
@ -118,7 +119,7 @@ struct utmpx *getutxid __P((const struct utmpx *));
struct utmpx *getutxline __P((const struct utmpx *));
struct utmpx *pututxline __P((const struct utmpx *));
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
int updwtmpx __P((const char *, const struct utmpx *));
int lastlogxname __P((const char *));
struct lastlogx *getlastlogx __P((uid_t, struct lastlogx *));
@ -129,7 +130,7 @@ void getutmpx __P((const struct utmp *, struct utmpx *));
int utmpxname __P((const char *));
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: wchar.h,v 1.17 2003/03/11 09:21:22 tshiozak Exp $ */
/* $NetBSD: wchar.h,v 1.18 2003/04/28 23:16:15 bjh21 Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
@ -66,6 +66,7 @@
#define _WCHAR_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/ansi.h>
#include <sys/null.h>
@ -150,8 +151,8 @@ long int wcstol __P((const wchar_t * __restrict,
wchar_t ** __restrict, int base));
double wcstod __P((const wchar_t * __restrict, wchar_t ** __restrict));
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
defined(_NETBSD_SOURCE)
/* LONGLONG */
long long int wcstoll __P((const wchar_t * __restrict,
wchar_t ** __restrict, int base));

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.7 2000/08/08 22:31:13 tshiozak Exp $ */
/* $NetBSD: limits.h,v 1.8 2003/04/28 23:16:16 bjh21 Exp $ */
/*
* Copyright (c) 1988, 1993
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
@ -70,17 +72,18 @@
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
/* Quads and longs are the same on the alpha */
@ -88,11 +91,10 @@
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 64
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.6 2003/01/17 22:11:16 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.7 2003/04/28 23:16:16 bjh21 Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -30,10 +30,11 @@
#ifndef _ALPHA_SIGNAL_H_
#define _ALPHA_SIGNAL_H_
#include <sys/featuretest.h>
typedef long sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@ -115,5 +116,5 @@ do { \
} \
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_ALPHA_SIGNAL_H_*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.11 2000/05/10 17:53:45 thorpej Exp $ */
/* $NetBSD: stdarg.h,v 1.12 2003/04/28 23:16:16 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -81,8 +81,8 @@ typedef _BSD_VA_LIST_ va_list;
#endif
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy((dest), (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.28 2003/01/08 00:02:29 thorpej Exp $ */
/* $NetBSD: types.h,v 1.29 2003/04/28 23:16:16 bjh21 Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -39,6 +39,7 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.2 2003/04/27 22:33:49 fvdl Exp $ */
/* $NetBSD: limits.h,v 1.3 2003/04/28 23:16:17 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,28 +62,28 @@
#define LONG_MAX 0x7fffffffffffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
/* $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -38,10 +38,11 @@
#ifndef _AMD64_SIGNAL_H_
#define _AMD64_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Get the "code" values
*/
@ -85,5 +86,5 @@ do { \
} \
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_AMD64_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
/* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -57,8 +57,8 @@ typedef _BSD_VA_LIST_ va_list;
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy((dest), (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $ */
/* $NetBSD: types.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.3 2001/09/03 01:51:39 matt Exp $ */
/* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _ARM32_LIMITS_H_
#define _ARM32_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,21 +62,22 @@
#define LONG_MAX 0x7fffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifdef __ELF__
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifdef __ELF__
#define SIZE_T_MAX LONG_MAX /* max value for a size_t */
#else
@ -85,11 +88,10 @@
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.2 2003/01/17 22:28:48 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.3 2003/04/28 23:16:18 bjh21 Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -46,12 +46,13 @@
#ifndef _ARM32_SIGNAL_H_
#define _ARM32_SIGNAL_H_
#include <sys/featuretest.h>
#ifndef _LOCORE
typedef int sig_atomic_t;
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifndef _LOCORE
/*
* Information pushed on stack when a signal is delivered.
@ -174,7 +175,7 @@ do { \
#define SIG_CODE_SEGV_ADDR_MASK SIG_CODE_BUS_ADDR_MASK
#define SIG_CODE_SEGV_TYPE_MASK SIG_CODE_BUS_TYPE_MASK
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_ARM_SIGNAL_H_ */
/* End of signal.h */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.5 2002/11/08 00:19:51 thorpej Exp $ */
/* $NetBSD: stdarg.h,v 1.6 2003/04/28 23:16:18 bjh21 Exp $ */
/*
* Copyright (c) 1991, 1993
@ -71,9 +71,9 @@ typedef _BSD_VA_LIST_ va_list;
#endif /* __GNUC_PREREQ__(2, 96) */
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy((dest), (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.7 2003/03/01 04:36:39 thorpej Exp $ */
/* $NetBSD: types.h,v 1.8 2003/04/28 23:16:18 bjh21 Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _ARM_TYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <arm/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t { /* Used by setjmp & longjmp */
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.1 2002/06/06 19:48:09 fredette Exp $ */
/* $NetBSD: param.h,v 1.2 2003/04/28 23:16:18 bjh21 Exp $ */
/* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */
@ -25,7 +25,9 @@
* Utah $Hdr: param.h 1.18 94/12/16$
*/
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#include <sys/featuretest.h>
#if defined(_NETBSD_SOURCE)
#include <machine/cpu.h>
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.2 2002/06/23 17:07:58 perry Exp $ */
/* $NetBSD: limits.h,v 1.3 2003/04/28 23:16:19 bjh21 Exp $ */
/* $OpenBSD: limits.h,v 1.2 2000/07/31 20:06:02 millert Exp $ */
@ -60,6 +60,8 @@
* @(#)limits.h 8.3 (Berkeley) 1/4/94
*/
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
@ -93,10 +95,11 @@
#define LONG_MAX 2147483647L /* max value for a long */
#define LONG_MIN (-2147483647-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
/* GCC requires that quad constants be written as expressions. */
@ -108,12 +111,11 @@
#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,11 +1,13 @@
/* $NetBSD: math.h,v 1.1 2002/06/05 01:04:22 fredette Exp $ */
/* $NetBSD: math.h,v 1.2 2003/04/28 23:16:19 bjh21 Exp $ */
#include <sys/featuretest.h>
/*
* ISO C99
*/
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
extern __const char __nanf[];
#define NAN (*(__const float *)(__const void *)__nanf)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.2 2003/04/01 20:47:25 thorpej Exp $ */
/* $NetBSD: param.h,v 1.3 2003/04/28 23:16:19 bjh21 Exp $ */
/* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */
@ -25,7 +25,9 @@
* Utah $Hdr: param.h 1.18 94/12/16$
*/
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#include <sys/featuretest.h>
#if defined(_NETBSD_SOURCE)
#include <machine/cpu.h>
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.1 2002/06/05 01:04:23 fredette Exp $ */
/* $NetBSD: signal.h,v 1.2 2003/04/28 23:16:19 bjh21 Exp $ */
/* $OpenBSD: signal.h,v 1.1 1998/06/23 19:45:27 mickey Exp $ */
@ -29,9 +29,11 @@
* Machine-dependent signal definitions
*/
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#include <machine/trap.h> /* codes for SIGILL, SIGFPE */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.4 2002/09/22 08:30:58 simonb Exp $ */
/* $NetBSD: types.h,v 1.5 2003/04/28 23:16:19 bjh21 Exp $ */
/* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */
@ -40,7 +40,9 @@
#ifndef _HPPA_TYPES_H_
#define _HPPA_TYPES_H_
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
#include <sys/featuretest.h>
#if defined(_NETBSD_SOURCE)
typedef struct label_t {
int lbl_rp;
int lbl_sp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.15 2000/08/08 22:31:13 tshiozak Exp $ */
/* $NetBSD: limits.h,v 1.16 2003/04/28 23:16:19 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,28 +62,28 @@
#define LONG_MAX 0x7fffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.15 2003/01/17 23:10:29 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.16 2003/04/28 23:16:19 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -38,10 +38,11 @@
#ifndef _I386_SIGNAL_H_
#define _I386_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Get the "code" values
*/
@ -166,5 +167,5 @@ do { \
#define sc_pc sc_eip
#define sc_ps sc_eflags
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_I386_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.19 2000/05/05 00:21:48 thorpej Exp $ */
/* $NetBSD: stdarg.h,v 1.20 2003/04/28 23:16:19 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -71,9 +71,9 @@ typedef _BSD_VA_LIST_ va_list;
#define __va_copy(dest, src) ((dest) = (src))
#endif
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy((dest), (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.41 2002/12/17 19:47:15 gmcgarry Exp $ */
/* $NetBSD: types.h,v 1.42 2003/04/28 23:16:20 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.14 2001/05/04 15:12:32 simonb Exp $ */
/* $NetBSD: limits.h,v 1.15 2003/04/28 23:16:20 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _M68K_MACHINE_LIMITS_H_
#define _M68K_MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,28 +62,28 @@
#define LONG_MAX 0x7fffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.11 2003/01/17 23:18:28 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.12 2003/04/28 23:16:20 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -38,10 +38,11 @@
#ifndef _M68K_SIGNAL_H_
#define _M68K_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Get the "code" values
*/
@ -208,5 +209,5 @@ struct sigframe {
};
#endif /* _KERNEL && __M68K_SIGNAL_PRIVATE */
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_M68K_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.19 2000/02/03 16:16:07 kleink Exp $ */
/* $NetBSD: stdarg.h,v 1.20 2003/04/28 23:16:20 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -59,9 +59,9 @@ typedef _BSD_VA_LIST_ va_list;
sizeof(type) != __va_size(type) ? \
sizeof(type) : __va_size(type))))
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) \
((dest) = (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.18 2003/01/17 23:18:28 thorpej Exp $ */
/* $NetBSD: types.h,v 1.19 2003/04/28 23:16:20 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -38,6 +38,7 @@
#define _M68K_TYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <m68k/int_types.h>
#if defined(_KERNEL)
@ -47,7 +48,7 @@ typedef struct label_t { /* consistent with HP-UX */
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.17 2002/11/30 01:52:32 simonb Exp $ */
/* $NetBSD: limits.h,v 1.18 2003/04/28 23:16:20 bjh21 Exp $ */
/*
* Copyright (c) 1988, 1993
@ -38,6 +38,8 @@
#ifndef _MIPS_LIMITS_H_
#define _MIPS_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
@ -76,21 +78,22 @@
#define LONG_MIN (-0x7fffffff-1) /* min value for a long */
#endif
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifdef _LP64
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifdef _LP64
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#else
@ -110,11 +113,10 @@
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
#endif
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#ifdef _LP64
#define LONG_BIT 64
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.18 2003/01/20 16:28:13 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.19 2003/04/28 23:16:21 bjh21 Exp $ */
/*
* Copyright (c) 1992, 1993
@ -41,6 +41,8 @@
#ifndef _MIPS_SIGNAL_H_
#define _MIPS_SIGNAL_H_
#include <sys/featuretest.h>
#include <machine/cdefs.h> /* for API selection */
#if !defined(__ASSEMBLER__)
@ -51,8 +53,7 @@
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@ -134,7 +135,7 @@ do { \
(uc)->uc_flags &= ~_UC_FPU; \
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_LANGUAGE_ASSEMBLY */
#if !defined(_KERNEL)

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.22 2002/03/05 14:18:12 simonb Exp $ */
/* $NetBSD: stdarg.h,v 1.23 2003/04/28 23:16:21 bjh21 Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -73,9 +73,9 @@ typedef _BSD_VA_LIST_ va_list;
))[-1])
#endif
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) \
((dest) = (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.36 2002/11/03 17:35:32 thorpej Exp $ */
/* $NetBSD: types.h,v 1.37 2003/04/28 23:16:21 bjh21 Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -42,6 +42,7 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <mips/int_types.h>
/*
@ -65,7 +66,7 @@ typedef long mips_fpreg_t;
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#if defined(_MIPS_PADDR_T_64BIT) && !defined(_LP64)
typedef unsigned long long paddr_t;
typedef unsigned long long psize_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.11 2000/08/08 22:31:13 tshiozak Exp $ */
/* $NetBSD: limits.h,v 1.12 2003/04/28 23:16:21 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,28 +62,28 @@
#define LONG_MAX 0x7fffffff /* max value for a long */
#define LONG_MIN (-0x7fffffff-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.8 1998/10/01 21:16:06 matthias Exp $ */
/* $NetBSD: signal.h,v 1.9 2003/04/28 23:16:21 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -38,10 +38,11 @@
#ifndef _MACHINE_SIGNAL_H_
#define _MACHINE_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Get the "code" values
*/
@ -79,5 +80,5 @@ struct sigcontext {
sigset_t sc_mask; /* signal mask to restore (new style) */
};
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_MACHINE_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.16 2000/02/03 16:16:08 kleink Exp $ */
/* $NetBSD: stdarg.h,v 1.17 2003/04/28 23:16:21 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -56,9 +56,9 @@ typedef _BSD_VA_LIST_ va_list;
#define va_arg(ap, type) \
(*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type)))
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) \
((dest) = (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.28 2002/09/22 08:31:00 simonb Exp $ */
/* $NetBSD: types.h,v 1.29 2003/04/28 23:16:21 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _MACHINE_TYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.10 2002/11/03 22:55:24 matt Exp $ */
/* $NetBSD: limits.h,v 1.11 2003/04/28 23:16:22 bjh21 Exp $ */
/*
* Copyright (c) 1988, 1993
@ -38,6 +38,8 @@
#ifndef _POWERPC_LIMITS_H_
#define _POWERPC_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
@ -76,21 +78,22 @@
#define LONG_MIN (-0x7fffffff-1) /* min value for a long */
#endif
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifdef _LP64
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifdef _LP64
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#else
@ -110,11 +113,10 @@
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
#endif
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#ifdef _LP64
#define LONG_BIT 64
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.11 2003/03/02 01:07:55 matt Exp $ */
/* $NetBSD: signal.h,v 1.12 2003/04/28 23:16:22 bjh21 Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -33,10 +33,11 @@
#ifndef _POWERPC_SIGNAL_H_
#define _POWERPC_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <machine/frame.h>
#if defined(__LIBC12_SOURCE__) || defined(_KERNEL)
@ -93,5 +94,5 @@ struct sigframe {
struct sigcontext sf_sc;
};
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_POWERPC_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.12 2003/01/18 21:38:03 matt Exp $ */
/* $NetBSD: stdarg.h,v 1.13 2003/04/28 23:16:22 bjh21 Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@ -150,8 +150,8 @@ typedef _BSD_VA_LIST_ va_list;
#endif /* __lint__ */
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy(dest, src)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.19 2003/01/18 21:28:10 matt Exp $ */
/* $NetBSD: types.h,v 1.20 2003/04/28 23:16:23 bjh21 Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@ -35,10 +35,11 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <powerpc/int_types.h>
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t, vaddr_t;
typedef unsigned long psize_t, vsize_t;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.5 2002/04/28 17:10:35 uch Exp $ */
/* $NetBSD: limits.h,v 1.6 2003/04/28 23:16:23 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _SH3_LIMITS_H_
#define _SH3_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,28 +62,28 @@
#define LONG_MAX 0x7fffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.5 2003/01/18 06:33:42 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.6 2003/04/28 23:16:23 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -38,10 +38,11 @@
#ifndef _SH3_SIGNAL_H_
#define _SH3_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Information pushed on stack when a signal is delivered.
@ -134,5 +135,5 @@ do { \
(uc)->uc_mcontext.__gregs[_REG_EXPEVT] = (sc)->sc_expevt; \
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_SH3_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.5 2002/04/28 17:10:37 uch Exp $ */
/* $NetBSD: stdarg.h,v 1.6 2003/04/28 23:16:23 bjh21 Exp $ */
#ifndef _SH3_STDARG_H_
#define _SH3_STDARG_H_
@ -27,9 +27,9 @@ typedef __gnuc_va_list va_list;
#endif /* __lint__ */
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy __va_copy
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.14 2002/12/16 02:15:58 thorpej Exp $ */
/* $NetBSD: types.h,v 1.15 2003/04/28 23:16:23 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _SH3_TYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sh3/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.1 2002/07/05 13:32:00 scw Exp $ */
/* $NetBSD: limits.h,v 1.2 2003/04/28 23:16:23 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _SH5_LIMITS_H_
#define _SH5_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -66,28 +68,28 @@
#define LONG_MIN (-0x7fffffffffffffffL-1)/* min value for a long */
#endif
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#ifndef _LP64
#define LONG_BIT 32
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.7 2003/01/22 13:46:44 scw Exp $ */
/* $NetBSD: signal.h,v 1.8 2003/04/28 23:16:24 bjh21 Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -44,14 +44,15 @@
#ifndef _SH5_SIGNAL_H_
#define _SH5_SIGNAL_H_
#include <sys/featuretest.h>
#ifndef _LP64
typedef long long sig_atomic_t;
#else
typedef long sig_atomic_t;
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <machine/reg.h>
@ -105,5 +106,5 @@ do { \
} else \
(uc)->uc_mcontext.__fpregs.__fp_scr = (sc)->sc_fpregs.r_fpscr;\
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_SH5_SIGNAL_H_*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.1 2002/07/05 13:32:02 scw Exp $ */
/* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:24 bjh21 Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -59,8 +59,8 @@ typedef _BSD_VA_LIST_ va_list;
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy((dest), (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.6 2003/03/26 14:46:33 scw Exp $ */
/* $NetBSD: types.h,v 1.7 2003/04/28 23:16:24 bjh21 Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -39,10 +39,11 @@
#define _SH5_TYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <sh5/int_types.h>
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.13 2002/05/03 18:27:41 thorpej Exp $ */
/* $NetBSD: limits.h,v 1.14 2003/04/28 23:16:24 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -66,17 +68,18 @@
#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
#endif
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
/* GCC requires that quad constants be written as expressions. */
@ -85,11 +88,10 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#ifdef __arch64__
#define LONG_BIT 64
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.10 2003/01/18 06:44:57 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.11 2003/04/28 23:16:24 bjh21 Exp $ */
/*
* Copyright (c) 1992, 1993
@ -47,12 +47,13 @@
#ifndef _SPARC_SIGNAL_H_
#define _SPARC_SIGNAL_H_
#include <sys/featuretest.h>
#ifndef _LOCORE
typedef int sig_atomic_t;
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifndef _LOCORE
/*
@ -168,5 +169,5 @@ do { \
#define FPE_FLTOPERR_TRAP 0xd0 /* operand error */
#define FPE_FLTOVF_TRAP 0xd4 /* overflow */
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_SPARC_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.18 2002/07/20 08:37:30 mrg Exp $ */
/* $NetBSD: stdarg.h,v 1.19 2003/04/28 23:16:24 bjh21 Exp $ */
/*
* Copyright (c) 1992, 1993
@ -62,9 +62,9 @@ typedef _BSD_VA_LIST_ va_list;
#define va_start(ap, last) \
(void)(__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs())
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
# define va_copy(dest, src) \
((dest) = (src))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.31 2002/12/07 10:27:04 pk Exp $ */
/* $NetBSD: types.h,v 1.32 2003/04/28 23:16:25 bjh21 Exp $ */
/*
* Copyright (c) 1992, 1993
@ -56,6 +56,7 @@
#endif
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -74,7 +75,7 @@ typedef unsigned long int register64_t;
typedef unsigned long long int register64_t;
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long int vaddr_t;
typedef vaddr_t vsize_t;
#ifdef SUN4U

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.11 2001/04/15 14:16:08 kleink Exp $ */
/* $NetBSD: limits.h,v 1.12 2003/04/28 23:16:25 bjh21 Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -38,6 +38,8 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#include <sys/featuretest.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
@ -60,21 +62,22 @@
#define LONG_MAX 0x7fffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
#if !defined(_ANSI_SOURCE)
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#ifdef __ELF__
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE)
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifdef __ELF__
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#else
@ -85,11 +88,10 @@
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define LONG_BIT 32
#define WORD_BIT 32

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.8 2003/01/18 07:10:33 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.9 2003/04/28 23:16:25 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -40,10 +40,11 @@
#ifndef _VAX_SIGNAL_H_
#define _VAX_SIGNAL_H_
#include <sys/featuretest.h>
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@ -98,5 +99,5 @@ do { \
(uc)->uc_mcontext.__gregs[_REG_PSL] = (sc)->sc_ps; \
} while (/*CONSTCOND*/0)
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_VAX_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.13 2000/07/01 06:38:53 matt Exp $ */
/* $NetBSD: stdarg.h,v 1.14 2003/04/28 23:16:25 bjh21 Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -67,9 +67,9 @@ typedef _BSD_VA_LIST_ va_list;
#define __va_copy(dest, src) ((dest) == (src))
#endif
#if !defined(_ANSI_SOURCE) && \
(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
#if !defined(_ANSI_SOURCE) && \
(defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
defined(_NETBSD_SOURCE))
#define va_copy(dest, src) __va_copy(dest, src)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.25 2002/09/22 08:31:02 simonb Exp $ */
/* $NetBSD: types.h,v 1.26 2003/04/28 23:16:25 bjh21 Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -39,6 +39,7 @@
#define _MACHTYPES_H_
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <machine/int_types.h>
#if defined(_KERNEL)
@ -48,7 +49,7 @@ typedef struct label_t {
#endif
/* NB: This should probably be if defined(_KERNEL) */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.h,v 1.86 2003/03/05 22:56:46 christos Exp $ */
/* $NetBSD: if.h,v 1.87 2003/04/28 23:16:25 bjh21 Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -74,7 +74,8 @@
#ifndef _NET_IF_H_
#define _NET_IF_H_
#if !defined(_XOPEN_SOURCE)
#include <sys/featuretest.h>
#if defined(_NETBSD_SOURCE)
#include <sys/socket.h>
#include <sys/queue.h>
@ -586,7 +587,7 @@ struct if_laddrreq {
#include <net/if_arp.h>
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#ifdef _KERNEL
#ifdef IFAREF_DEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: in.h,v 1.60 2003/04/12 00:17:49 dogcow Exp $ */
/* $NetBSD: in.h,v 1.61 2003/04/28 23:16:26 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -295,7 +295,7 @@ struct ip_mreq {
#define IP_PORTRANGE_HIGH 1 /* same as DEFAULT (FreeBSD compat) */
#define IP_PORTRANGE_LOW 2 /* use privileged range */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Definitions for inet sysctl operations.
*
@ -409,7 +409,7 @@ struct ip_mreq {
{ "grettl", CTLTYPE_INT }, \
{ "checkinterface", CTLTYPE_INT }, \
}
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
/* INET6 stuff */
#define __KAME_NETINET_IN_H_INCLUDED_

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6.h,v 1.41 2002/06/08 21:22:31 itojun Exp $ */
/* $NetBSD: in6.h,v 1.42 2003/04/28 23:16:27 bjh21 Exp $ */
/* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */
/*
@ -108,7 +108,7 @@
* The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define IPV6PORT_RESERVED 1024
#define IPV6PORT_ANONMIN 49152
#define IPV6PORT_ANONMAX 65535
@ -139,7 +139,7 @@ struct in6_addr {
/*
* Socket address for IPv6
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SIN6_LEN
#endif
struct sockaddr_in6 {
@ -372,7 +372,7 @@ extern const struct in6_addr in6addr_linklocal_allrouters;
/*
* IP6 route structure
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
struct route_in6 {
struct rtentry *ro_rt;
struct sockaddr_in6 ro_dst;
@ -397,7 +397,7 @@ struct route_in6 {
#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */
#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */
#define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */
#endif
#define IPV6_PKTINFO 19 /* bool; send/rcv if, src/dst addr */
@ -450,7 +450,7 @@ struct in6_pktinfo {
#define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
#define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Definitions for inet6 sysctl operations.
*
@ -591,7 +591,7 @@ struct in6_pktinfo {
{ "maxfrags", CTLTYPE_INT }, \
}
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#ifdef _KERNEL
struct cmsghdr;
@ -660,7 +660,7 @@ extern u_char ip6_protox[];
#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
#endif /* _KERNEL */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <machine/ansi.h>
@ -695,6 +695,6 @@ extern int inet6_rthdr_segments __P((const struct cmsghdr *));
extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int));
extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int));
__END_DECLS
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* !_NETINET6_IN6_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dirent.h,v 1.14 1998/05/05 21:53:38 kleink Exp $ */
/* $NetBSD: dirent.h,v 1.15 2003/04/28 23:16:27 bjh21 Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -64,7 +64,7 @@ struct dirent {
#endif
};
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* File types
*/
@ -83,7 +83,7 @@ struct dirent {
*/
#define IFTODT(mode) (((mode) & 0170000) >> 12)
#define DTTOIF(dirtype) ((dirtype) << 12)
#endif /* !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */
#endif /* defined(_NETBSD_SOURCE) */
#ifdef _KERNEL
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: endian.h,v 1.5 2002/05/12 22:59:50 kleink Exp $ */
/* $NetBSD: endian.h,v 1.6 2003/04/28 23:16:27 bjh21 Exp $ */
/*
* Copyright (c) 1987, 1991, 1993
@ -38,6 +38,8 @@
#ifndef _SYS_ENDIAN_H_
#define _SYS_ENDIAN_H_
#include <sys/featuretest.h>
/*
* Definitions for byte order, according to byte significance from low
* address to high.
@ -62,7 +64,7 @@
#endif
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
/*
* Traditional names for byteorder. These are defined as the numeric
* sequences so that third party code can "#define XXX_ENDIAN" and not

View File

@ -1,4 +1,4 @@
/* $NetBSD: errno.h,v 1.30 2003/04/09 21:36:29 kleink Exp $ */
/* $NetBSD: errno.h,v 1.31 2003/04/28 23:16:27 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -43,6 +43,8 @@
#ifndef _SYS_ERRNO_H_
#define _SYS_ERRNO_H_
#include <sys/featuretest.h>
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
@ -58,9 +60,9 @@
#define ENOMEM 12 /* Cannot allocate memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define ENOTBLK 15 /* Block device required */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define EBUSY 16 /* Device busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
@ -71,9 +73,9 @@
#define ENFILE 23 /* Too many open files in system */
#define EMFILE 24 /* Too many open files */
#define ENOTTY 25 /* Inappropriate ioctl for device */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define ETXTBSY 26 /* Text file busy */
#endif /* !_POSIX_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
@ -87,7 +89,7 @@
/* non-blocking and interrupt i/o */
#define EAGAIN 35 /* Resource temporarily unavailable */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define EWOULDBLOCK EAGAIN /* Operation would block */
#define EINPROGRESS 36 /* Operation now in progress */
#define EALREADY 37 /* Operation already in progress */
@ -99,13 +101,13 @@
#define EPROTOTYPE 41 /* Protocol wrong type for socket */
#define ENOPROTOOPT 42 /* Protocol not available */
#define EPROTONOSUPPORT 43 /* Protocol not supported */
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define EOPNOTSUPP 45 /* Operation not supported */
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define EPFNOSUPPORT 46 /* Protocol family not supported */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
#define EADDRINUSE 48 /* Address already in use */
#define EADDRNOTAVAIL 49 /* Can't assign requested address */
@ -113,69 +115,69 @@
/* ipc/network software -- operational errors */
#define ENETDOWN 50 /* Network is down */
#define ENETUNREACH 51 /* Network is unreachable */
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define ENETRESET 52 /* Network dropped connection on reset */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define ECONNABORTED 53 /* Software caused connection abort */
#define ECONNRESET 54 /* Connection reset by peer */
#define ENOBUFS 55 /* No buffer space available */
#define EISCONN 56 /* Socket is already connected */
#define ENOTCONN 57 /* Socket is not connected */
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define ESHUTDOWN 58 /* Can't send after socket shutdown */
#define ETOOMANYREFS 59 /* Too many references: can't splice */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD__SOURCE */
#define ETIMEDOUT 60 /* Operation timed out */
#define ECONNREFUSED 61 /* Connection refused */
#define ELOOP 62 /* Too many levels of symbolic links */
#endif /* !_POSIX_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#define ENAMETOOLONG 63 /* File name too long */
/* should be rearranged */
#ifndef _POSIX_SOURCE
#ifndef _XOPEN_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#if defined(_NETBSD_SOURCE)
#define EHOSTDOWN 64 /* Host is down */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define EHOSTUNREACH 65 /* No route to host */
#endif /* !_POSIX_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#define ENOTEMPTY 66 /* Directory not empty */
/* quotas & mush */
#ifndef _POSIX_SOURCE
#ifndef _XOPEN_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#if defined(_NETBSD_SOURCE)
#define EPROCLIM 67 /* Too many processes */
#define EUSERS 68 /* Too many users */
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define EDQUOT 69 /* Disc quota exceeded */
/* Network File System */
#define ESTALE 70 /* Stale NFS file handle */
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
#define EREMOTE 71 /* Too many levels of remote in path */
#define EBADRPC 72 /* RPC struct is bad */
#define ERPCMISMATCH 73 /* RPC version wrong */
#define EPROGUNAVAIL 74 /* RPC prog. not avail */
#define EPROGMISMATCH 75 /* Program version wrong */
#define EPROCUNAVAIL 76 /* Bad procedure for program */
#endif /* !_XOPEN_SOURCE */
#endif /* !_POSIX_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#define ENOLCK 77 /* No locks available */
#define ENOSYS 78 /* Function not implemented */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define EFTYPE 79 /* Inappropriate file type or format */
#define EAUTH 80 /* Authentication error */
#define ENEEDAUTH 81 /* Need authenticator */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
/* SystemV IPC */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define EIDRM 82 /* Identifier removed */
#define ENOMSG 83 /* No message of desired type */
#define EOVERFLOW 84 /* Value too large to be stored in data type */
#endif /* !_POSIX_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
/* Wide/multibyte-character handling, ISO/IEC 9899/AMD1:1995 */
#define EILSEQ 85 /* Illegal byte sequence */

View File

@ -1,4 +1,4 @@
/* $NetBSD: event.h,v 1.7 2003/02/16 09:30:23 tron Exp $ */
/* $NetBSD: event.h,v 1.8 2003/04/28 23:16:28 bjh21 Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
* All rights reserved.
@ -30,6 +30,7 @@
#ifndef _SYS_EVENT_H_
#define _SYS_EVENT_H_
#include <sys/featuretest.h>
#include <sys/types.h> /* for size_t */
#include <sys/inttypes.h> /* for uintptr_t */
#include <sys/null.h> /* for NULL */
@ -214,7 +215,7 @@ int seltrue_kqfilter(dev_t dev, struct knote *kn);
struct timespec;
__BEGIN_DECLS
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int kqueue __P((void));
int kevent __P((int kq, const struct kevent *changelist, size_t nchanges,
struct kevent *eventlist, size_t nevents,

View File

@ -1,4 +1,4 @@
/* $NetBSD: fcntl.h,v 1.23 2003/02/25 23:12:06 perseant Exp $ */
/* $NetBSD: fcntl.h,v 1.24 2003/04/28 23:16:28 bjh21 Exp $ */
/*-
* Copyright (c) 1983, 1990, 1993
@ -52,9 +52,9 @@
#ifndef _KERNEL
#include <sys/featuretest.h>
#include <sys/types.h>
#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#include <sys/stat.h>
#endif /* !_POSIX_C_SOURCE */
#endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
#endif /* !_KERNEL */
/*
@ -78,24 +78,23 @@
* FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
* which was documented to use FREAD/FWRITE, continues to work.
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define FREAD 0x00000001
#define FWRITE 0x00000002
#endif
#define O_NONBLOCK 0x00000004 /* no delay */
#define O_APPEND 0x00000008 /* set append mode */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define O_SHLOCK 0x00000010 /* open with shared file lock */
#define O_EXLOCK 0x00000020 /* open with exclusive file lock */
#define O_ASYNC 0x00000040 /* signal pgrp when data ready */
#endif
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199309L || \
#if (_POSIX_C_SOURCE - 0) >= 199309L || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
#define O_SYNC 0x00000080 /* synchronous writes */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define O_NOFOLLOW 0x00000100 /* don't follow symlinks on the last */
/* path component */
#endif
@ -103,13 +102,13 @@
#define O_TRUNC 0x00000400 /* truncate to zero length */
#define O_EXCL 0x00000800 /* error if already exists */
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
defined(_NETBSD_SOURCE)
#define O_DSYNC 0x00010000 /* write: I/O data completion */
#define O_RSYNC 0x00020000 /* read: I/O completion as for write */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define O_ALT_IO 0x00040000 /* use alternate i/o semantics */
#endif
@ -141,7 +140,7 @@
* and by fcntl. We retain the F* names for the kernel f_flags field
* and for backward compatibility for fcntl.
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define FAPPEND O_APPEND /* kernel/compat */
#define FASYNC O_ASYNC /* kernel/compat */
#define O_FSYNC O_SYNC /* compat */
@ -166,7 +165,7 @@
#define F_SETFD 2 /* set file descriptor flags */
#define F_GETFL 3 /* get file status flags */
#define F_SETFL 4 /* set file status flags */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
#endif
@ -188,7 +187,7 @@
#endif
/* Constants for fcntl's passed to the underlying fs - like ioctl's. */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define F_PARAM_MASK 0xfff
#define F_PARAM_LEN(x) (((x) >> 16) & F_PARAM_MASK)
#define F_PARAM_MAX 4095
@ -222,7 +221,7 @@
#define _FCNW_FSPRIV(f, c, t) _FCN_FSPRIV(F_FSOUT, (f), (c), (int)sizeof(t))
#define _FCNRW_FSPRIV(f, c, t) _FCN_FSPRIV(F_FSINOUT, (f), (c), (int)sizeof(t))
#endif /* neither POSIX nor _XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
/*
* Advisory file segment locking data type -
@ -237,7 +236,7 @@ struct flock {
};
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/* lock operations for flock(2) */
#define LOCK_SH 0x01 /* shared file lock */
#define LOCK_EX 0x02 /* exclusive file lock */
@ -263,9 +262,9 @@ __BEGIN_DECLS
int open __P((const char *, int, ...));
int creat __P((const char *, mode_t));
int fcntl __P((int, int, ...));
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int flock __P((int, int));
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
__END_DECLS
#endif /* !_KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: featuretest.h,v 1.3 2001/12/20 20:07:24 thorpej Exp $ */
/* $NetBSD: featuretest.h,v 1.4 2003/04/28 23:16:28 bjh21 Exp $ */
/*
* Written by Klaus Klein <kleink@NetBSD.ORG>, February 2, 1998.
@ -10,10 +10,62 @@
* protect each CPP macro that we want to supply.
*/
/*
* Feature-test macros are defined by several standards, and allow an
* application to specify what symbols they want the system headers to
* expose, and hence what standard they want them to conform to.
* There are two classes of feature-test macros. The first class
* specify complete standards, and if one of these is defined, header
* files will try to conform to the relevant standard. They are:
*
* ANSI macros:
* _ANSI_SOURCE ANSI C89
*
* POSIX macros:
* _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
* _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
* _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
* _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
* _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
* _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
*
* X/Open macros:
* _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
* _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
* _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
* _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
*
* NetBSD macros:
* _NETBSD_SOURCE == 1 Make all NetBSD features available.
*
* If more than one of these "major" feature-test macros is defined,
* then the set of facilities provided (and namespace used) is the
* union of that specified by the relevant standards, and in case of
* conflict, the earlier standard in the above list has precedence (so
* if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
* of rename() that's used is the POSIX one). If none of the "major"
* feature-test macros is defined, _NETBSD_SOURCE is assumed.
*
* There are also "minor" feature-test macros, which enable extra
* functionality in addition to some base standard. They should be
* defined along with one of the "major" macros. The "minor" macros
* are:
*
* _REENTRANT
* _ISO_C99_SOURCE
* _LARGEFILE_SOURCE Large File Support
* <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
*/
#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 1L
#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) && !defined(_NETBSD_SOURCE)
#define _NETBSD_SOURCE 1
#endif
#if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \
!defined(_REENTRANT)
#define _REENTRANT

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipc.h,v 1.24 2002/08/07 23:39:24 soren Exp $ */
/* $NetBSD: ipc.h,v 1.25 2003/04/28 23:16:28 bjh21 Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -52,6 +52,7 @@
#ifndef _SYS_IPC_H_
#define _SYS_IPC_H_
#include <sys/featuretest.h>
#include <sys/types.h>
struct ipc_perm {
@ -70,7 +71,7 @@ struct ipc_perm {
key_t _key; /* user specified msg/sem/shm key */
};
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/* Warning: 64-bit structure padding is needed here */
struct ipc_perm_sysctl {
u_int64_t _key;
@ -82,7 +83,7 @@ struct ipc_perm_sysctl {
int16_t _seq;
int16_t pad;
};
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#ifdef _KERNEL
/*
@ -121,7 +122,7 @@ struct ipc_perm14 {
* The first of these is used by ipcs(1), and so is defined outside the
* kernel as well.
*/
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define IXSEQ_TO_IPCID(ix,perm) (((perm._seq) << 16) | (ix & 0xffff))
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: mman.h,v 1.30 2003/04/10 21:35:20 atatat Exp $ */
/* $NetBSD: mman.h,v 1.31 2003/04/28 23:16:28 bjh21 Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@ -130,7 +130,7 @@ typedef __off_t off_t; /* file offset */
#define MCL_CURRENT 0x01 /* lock all pages currently mapped */
#define MCL_FUTURE 0x02 /* lock all pages mapped in the future */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Advice to madvise
*/
@ -170,7 +170,7 @@ int mlock __P((const void *, size_t));
int munlock __P((const void *, size_t));
int mlockall __P((int));
int munlockall __P((void));
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int madvise __P((void *, size_t, int));
int mincore __P((void *, size_t, char *));
int minherit __P((void *, size_t, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: mount.h,v 1.101 2003/04/16 21:44:25 christos Exp $ */
/* $NetBSD: mount.h,v 1.102 2003/04/28 23:16:28 bjh21 Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@ -39,10 +39,11 @@
#define _SYS_MOUNT_H_
#ifndef _KERNEL
#include <sys/featuretest.h>
#include <sys/ucred.h>
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <sys/stat.h>
#endif /* !_POSIX_C_SOURCE */
#endif /* _NETBSD_SOURCE */
#endif
#include <sys/queue.h>
#include <sys/lock.h>
@ -519,11 +520,11 @@ int getmntinfo __P((struct statfs **, int));
int mount __P((const char *, const char *, int, void *));
int statfs __P((const char *, struct statfs *));
int unmount __P((const char *, int));
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int fhopen __P((const fhandle_t *, int));
int fhstat __P((const fhandle_t *, struct stat *));
int fhstatfs __P((const fhandle_t *, struct statfs *));
#endif /* !_POSIX_C_SOURCE */
#endif /* _NETBSD_SOURCE */
__END_DECLS
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.h,v 1.13 2000/06/02 15:53:05 simonb Exp $ */
/* $NetBSD: msg.h,v 1.14 2003/04/28 23:16:29 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -59,6 +59,7 @@
#ifndef _SYS_MSG_H_
#define _SYS_MSG_H_
#include <sys/featuretest.h>
#include <sys/ipc.h>
#ifdef _KERNEL
@ -119,7 +120,7 @@ struct msqid_ds14 {
};
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Based on the configuration parameters described in an SVR2 (yes, two)
* config(1m) man page.

View File

@ -1,4 +1,4 @@
/* $NetBSD: poll.h,v 1.6 1998/09/13 14:46:24 christos Exp $ */
/* $NetBSD: poll.h,v 1.7 2003/04/28 23:16:29 bjh21 Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -39,6 +39,8 @@
#ifndef _SYS_POLL_H_
#define _SYS_POLL_H_
#include <sys/featuretest.h>
typedef unsigned int nfds_t;
struct pollfd {
@ -65,7 +67,7 @@ struct pollfd {
#define POLLHUP 0x0010
#define POLLNVAL 0x0020
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Infinite timeout value.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: resource.h,v 1.20 1999/09/28 14:47:04 bouyer Exp $ */
/* $NetBSD: resource.h,v 1.21 2003/04/28 23:16:29 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -38,6 +38,7 @@
#ifndef _SYS_RESOURCE_H_
#define _SYS_RESOURCE_H_
#include <sys/featuretest.h>
#include <sys/time.h>
/*
@ -110,7 +111,7 @@ struct rlimit {
rlim_t rlim_max; /* maximum value for rlim_cur */
};
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/* Load average structure. */
struct loadavg {
fixpt_t ldavg[3];

View File

@ -1,4 +1,4 @@
/* $NetBSD: sched.h,v 1.16 2003/02/04 13:41:49 yamt Exp $ */
/* $NetBSD: sched.h,v 1.17 2003/04/28 23:16:29 bjh21 Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@ -79,6 +79,8 @@
#ifndef _SYS_SCHED_H_
#define _SYS_SCHED_H_
#include <sys/featuretest.h>
#if defined(_KERNEL_OPT)
#include "opt_multiprocessor.h"
#include "opt_lockdebug.h"
@ -97,8 +99,7 @@ struct sched_param {
/* Other nonstandard policies: */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) && \
!defined(_ANSI_SOURCE)
#if defined(_NETBSD_SOURCE)
#include <sys/time.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.h,v 1.13 2002/03/17 22:21:59 christos Exp $ */
/* $NetBSD: sem.h,v 1.14 2003/04/28 23:16:29 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -138,7 +138,7 @@ struct sem_undo {
};
#endif /* _KERNEL */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* semaphore info struct
*/
@ -244,7 +244,7 @@ int semctl __P((int, int, int, ...)) __RENAME(__semctl13);
#endif
int semget __P((key_t, int, int));
int semop __P((int, struct sembuf *, size_t));
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
int semconfig __P((int));
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: shm.h,v 1.31 2002/08/07 23:39:24 soren Exp $ */
/* $NetBSD: shm.h,v 1.32 2003/04/28 23:16:29 bjh21 Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -123,16 +123,16 @@ struct shmid_ds14 {
};
#endif /* _KERNEL */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Some systems (e.g. HP-UX) take these as the second (cmd) arg to shmctl().
* XXX Currently not implemented.
*/
#define SHM_LOCK 3 /* Lock segment in memory. */
#define SHM_UNLOCK 4 /* Unlock a segment locked by SHM_LOCK. */
#endif /* _XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Permission definitions used in shmflag arguments to shmat(2) and shmget(2).
* Provided for source compatibility only; do not use in new code!
@ -168,7 +168,7 @@ struct shm_sysctl_info {
int32_t pad; /* shminfo not a multiple of 64 bits */
struct shmid_ds_sysctl shmids[1];
};
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#ifdef _KERNEL
extern struct shminfo shminfo;

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.50 2003/01/18 09:53:20 thorpej Exp $ */
/* $NetBSD: signal.h,v 1.51 2003/04/28 23:16:30 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -48,8 +48,7 @@
#define _NSIG 64
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define NSIG _NSIG
#if defined(__LIBC12_SOURCE__) || defined(_KERNEL)
@ -57,33 +56,33 @@
#define NSIG13 32
#endif
#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt */
#define SIGQUIT 3 /* quit */
#define SIGILL 4 /* illegal instruction (not reset when caught) */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#endif
#define SIGABRT 6 /* abort() */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGIOT SIGABRT /* compatibility */
#define SIGEMT 7 /* EMT instruction */
#endif
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGBUS 10 /* bus error */
#endif
#define SIGSEGV 11 /* segmentation violation */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGSYS 12 /* bad argument to system call */
#endif
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#define SIGTERM 15 /* software termination signal from kill */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGURG 16 /* urgent condition on IO channel */
#endif
#define SIGSTOP 17 /* sendable stop signal not from tty */
@ -92,7 +91,7 @@
#define SIGCHLD 20 /* to parent on child stop or exit */
#define SIGTTIN 21 /* to readers pgrp upon background tty read */
#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGIO 23 /* input/output possible signal */
#define SIGXCPU 24 /* exceeded CPU time limit */
#define SIGXFSZ 25 /* exceeded file size limit */
@ -103,7 +102,7 @@
#endif
#define SIGUSR1 30 /* user defined signal 1 */
#define SIGUSR2 31 /* user defined signal 2 */
#ifndef _POSIX_SOURCE
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
#define SIGPWR 32 /* power fail/restart (not reset when caught) */
#endif
#ifdef _KERNEL
@ -120,7 +119,8 @@
#define SIG_ERR ((void (*) __P((int))) -1)
#define SIG_HOLD ((void (*) __P((int))) 3)
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#if defined(__LIBC12_SOURCE__) || defined(_KERNEL)
/*
* Signal vector "template" used in sigaction call.
@ -160,9 +160,8 @@ struct sigaction {
#define sa_handler _sa_u._sa_handler
#define sa_sigaction _sa_u._sa_sigaction
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
#define SA_ONSTACK 0x0001 /* take signal on signal stack */
#define SA_RESTART 0x0002 /* restart system on signal return */
#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
@ -170,7 +169,7 @@ struct sigaction {
#if defined(_KERNEL)
#define SA_SIGINFO 0x0040
#endif /* _KERNEL */
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
/* Only valid for SIGCHLD. */
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
#define SA_NOCLDWAIT 0x0020 /* do not generate zombies on unwaited child */
@ -185,13 +184,12 @@ struct sigaction {
#define SIG_UNBLOCK 2 /* unblock specified signal set */
#define SIG_SETMASK 3 /* set specified signal set */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
typedef void (*sig_t) __P((int)); /* type of signal function */
#endif
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
/*
* Flags used with stack_t/struct sigaltstack.
*/
@ -202,9 +200,9 @@ typedef void (*sig_t) __P((int)); /* type of signal function */
#endif
#define MINSIGSTKSZ 8192 /* minimum allowable stack */
#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* 4.3 compatibility:
* Signal vector "template" used in sigvec call.
@ -219,11 +217,10 @@ struct sigvec {
#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */
#define SV_RESETHAND SA_RESETHAND
#define sv_onstack sv_flags /* isn't compatibility wonderful! */
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
/*
* Structure used in sigstack call.
*/
@ -231,11 +228,11 @@ struct sigstack {
void *ss_sp; /* signal stack pointer */
int ss_onstack; /* current status */
};
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
#include <machine/signal.h> /* sigcontext; codes for SIGILL, SIGFPE */
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) && !defined(_KERNEL)
#if defined(_NETBSD_SOURCE) && !defined(_KERNEL)
/*
* Macro for converting signal number to a mask suitable for
* sigblock().
@ -243,7 +240,7 @@ struct sigstack {
#define sigmask(n) __sigmask(n)
#define BADSIG SIG_ERR
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
struct sigevent {
int sigev_notify;
@ -258,7 +255,7 @@ struct sigevent {
#define SIGEV_THREAD 2
#define SIGEV_SA 3
#endif /* !_ANSI_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
/*
* For historical reasons; programs expect signal's return value to be

View File

@ -1,4 +1,4 @@
/* $NetBSD: sigtypes.h,v 1.2 2003/01/18 09:53:17 thorpej Exp $ */
/* $NetBSD: sigtypes.h,v 1.3 2003/04/28 23:16:30 bjh21 Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -58,7 +58,8 @@ typedef _BSD_SIZE_T_ size_t;
#undef _BSD_SIZE_T_
#endif
#ifndef _ANSI_SOURCE
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
defined(_NETBSD_SOURCE)
#if defined(__LIBC12_SOURCE__) || defined(_KERNEL)
typedef unsigned int sigset13_t;
@ -128,21 +129,20 @@ struct sigaltstack13 {
};
#endif /* defined(__LIBC12_SOURCE__) || defined(_KERNEL) */
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500
#if (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
typedef struct
#ifndef _XOPEN_SOURCE
#if defined(_NETBSD_SOURCE)
sigaltstack
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
{
void *ss_sp; /* signal stack base */
size_t ss_size; /* signal stack length */
int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
} stack_t;
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || ... */
#endif /* _XOPEN_SOURCE_EXTENDED || XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || ... */
#endif /* !_SYS_SIGTYPES_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: socket.h,v 1.66 2003/04/19 21:30:29 christos Exp $ */
/* $NetBSD: socket.h,v 1.67 2003/04/28 23:16:30 bjh21 Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -67,6 +67,8 @@
#ifndef _SYS_SOCKET_H_
#define _SYS_SOCKET_H_
#include <sys/featuretest.h>
/*
* Definitions related to sockets: types, address families, options.
*/
@ -173,24 +175,24 @@ struct linger {
#define AF_APPLETALK 16 /* Apple Talk */
#define AF_ROUTE 17 /* Internal Routing Protocol */
#define AF_LINK 18 /* Link layer interface */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
#endif
#define AF_COIP 20 /* connection-oriented IP, aka ST II */
#define AF_CNT 21 /* Computer Network Technology */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
#endif
#define AF_IPX 23 /* Novell Internet Protocol */
#define AF_INET6 24 /* IP version 6 */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
#endif
#define AF_ISDN 26 /* Integrated Services Digital Network*/
#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
#define AF_NATM 27 /* native ATM access */
#define AF_ARP 28 /* (rev.) addr. res. prot. (RFC 826) */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define pseudo_AF_KEY 29 /* Internal key management protocol */
#define pseudo_AF_HDRCMPLT 30 /* Used by BPF to not rewrite hdrs
in interface output routine */
@ -229,7 +231,7 @@ struct sockproto {
#define _SS_PAD2SIZE (_SS_MAXSIZE - 2 - \
_SS_PAD1SIZE - _SS_ALIGNSIZE)
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
#if (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
struct sockaddr_storage {
__uint8_t ss_len; /* address length */
sa_family_t ss_family; /* address family */
@ -237,7 +239,7 @@ struct sockaddr_storage {
__int64_t __ss_align;/* force desired structure storage alignment */
char __ss_pad2[_SS_PAD2SIZE];
};
#endif /* !_XOPEN_SOURCE || ... */
#endif /* _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
#endif /* 1 */
/*
@ -264,14 +266,14 @@ struct sockaddr_storage {
#define PF_APPLETALK AF_APPLETALK
#define PF_ROUTE AF_ROUTE
#define PF_LINK AF_LINK
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
#endif
#define PF_COIP AF_COIP
#define PF_CNT AF_CNT
#define PF_INET6 AF_INET6
#define PF_IPX AF_IPX /* same format as AF_NS */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define PF_RTIP pseudo_AF_FTIP /* same format as AF_INET */
#define PF_PIP pseudo_AF_PIP
#endif
@ -279,13 +281,13 @@ struct sockaddr_storage {
#define PF_E164 AF_E164
#define PF_NATM AF_NATM
#define PF_ARP AF_ARP
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define PF_KEY pseudo_AF_KEY /* like PF_ROUTE, only for key mgmt */
#endif
#define PF_MAX AF_MAX
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#ifndef gid_t
typedef __gid_t gid_t; /* group id */
@ -314,10 +316,10 @@ struct sockcred {
*/
#define SOCKCREDSIZE(ngrps) \
(sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1)))
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* Definitions for network related sysctl, CTL_NET.
*
@ -360,9 +362,9 @@ struct sockcred {
{ "arp", CTLTYPE_NODE }, \
{ "key", CTLTYPE_NODE }, \
}
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* PF_ROUTE - Routing table
*
@ -384,7 +386,7 @@ struct sockcred {
{ 0, 0 }, \
{ "iflist", CTLTYPE_STRUCT }, \
}
#endif /* !_XOPEN_SOURCE */
#endif /* _NETBSD_SOURCE */
/*
* Maximum queue length specifiable by listen(2).
@ -472,7 +474,7 @@ struct cmsghdr {
/* "Socket"-level control message types: */
#define SCM_RIGHTS 0x01 /* access rights (array of int) */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
#define SCM_CREDS 0x04 /* credentials (struct sockcred) */
#endif
@ -484,7 +486,7 @@ struct cmsghdr {
#define SHUT_WR 1 /* Disallow further sends. */
#define SHUT_RDWR 2 /* Disallow further sends/receives. */
#if !defined(_XOPEN_SOURCE)
#if defined(_NETBSD_SOURCE)
/*
* 4.3 compat sockaddr, move to compat file later
*/

Some files were not shown because too many files have changed in this diff Show More