Changed to conform to XPG4.2 when _XOPEN_SOURCE is defined.
Added some additional SysV compatible types as an extension.
This commit is contained in:
parent
ed24bc5ba8
commit
62cf945e80
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: types.h,v 1.24 1995/12/29 01:15:13 jtc Exp $ */
|
||||
/* $NetBSD: types.h,v 1.25 1996/03/15 19:54:53 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
@ -49,13 +49,16 @@
|
||||
#include <machine/ansi.h>
|
||||
#include <machine/endian.h>
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
|
||||
typedef unsigned char unchar; /* Sys V compatibility */
|
||||
typedef unsigned short ushort; /* Sys V compatibility */
|
||||
typedef unsigned int uint; /* Sys V compatibility */
|
||||
typedef unsigned long ulong; /* Sys V compatibility */
|
||||
#endif
|
||||
|
||||
typedef u_int64_t u_quad_t; /* quads */
|
||||
@ -83,7 +86,7 @@ typedef u_int32_t uid_t; /* user id */
|
||||
* long arguments will be promoted to off_t if the program fails to
|
||||
* include that header or explicitly cast them to off_t.
|
||||
*/
|
||||
#ifndef _POSIX_SOURCE
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
@ -92,9 +95,9 @@ int ftruncate __P((int, off_t));
|
||||
int truncate __P((const char *, off_t));
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !defined(_POSIX_SOURCE) ... */
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
/* Major, minor numbers, dev_t's. */
|
||||
#define major(x) ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
|
||||
#define minor(x) ((int32_t)((x) & 0xff))
|
||||
@ -121,7 +124,7 @@ typedef _BSD_TIME_T_ time_t;
|
||||
#undef _BSD_TIME_T_
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_SOURCE
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define NBBY 8 /* number of bits in a byte */
|
||||
|
||||
/*
|
||||
@ -172,5 +175,5 @@ struct tty;
|
||||
struct uio;
|
||||
#endif
|
||||
|
||||
#endif /* !_POSIX_SOURCE */
|
||||
#endif /* !defined(_POSIX_SOURCE) ... */
|
||||
#endif /* !_SYS_TYPES_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user