diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/arm32/include/ansi.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/i386/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/kbus/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/m68k/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/mips/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/pc532/include/ansi.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/sparc/include/ansi.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/ansi.h | 29 | ||||
-rw-r--r-- | sys/arch/wgrisc/include/ansi.h | 9 | ||||
-rw-r--r-- | sys/sys/types.h | 54 |
14 files changed, 136 insertions, 40 deletions
diff --git a/sys/arch/alpha/include/ansi.h b/sys/arch/alpha/include/ansi.h index dfbe4e1a7c3..f7a73d224b8 100644 --- a/sys/arch/alpha/include/ansi.h +++ b/sys/arch/alpha/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.8 1997/07/07 05:56:34 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.9 2000/02/22 17:29:12 millert Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:45 jtc Exp $ */ /*- @@ -80,4 +80,10 @@ typedef struct { #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/arm32/include/ansi.h b/sys/arch/arm32/include/ansi.h index 9808e5d9e59..95fd820ba5d 100644 --- a/sys/arch/arm32/include/ansi.h +++ b/sys/arch/arm32/include/ansi.h @@ -74,4 +74,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/hppa/include/ansi.h b/sys/arch/hppa/include/ansi.h index ac8010a0aee..c6a19caa455 100644 --- a/sys/arch/hppa/include/ansi.h +++ b/sys/arch/hppa/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.3 1998/11/23 03:28:22 mickey Exp $ */ +/* $OpenBSD: ansi.h,v 1.4 2000/02/22 17:29:12 millert Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -73,4 +73,10 @@ #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _MACHINE_ANSI_H_ */ diff --git a/sys/arch/i386/include/ansi.h b/sys/arch/i386/include/ansi.h index 30236051613..77007789441 100644 --- a/sys/arch/i386/include/ansi.h +++ b/sys/arch/i386/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.6 1997/07/07 05:56:37 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.7 2000/02/22 17:29:13 millert Exp $ */ /* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:50 jtc Exp $ */ /*- @@ -75,4 +75,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/kbus/include/ansi.h b/sys/arch/kbus/include/ansi.h index a22d79860bc..ee7bff74d62 100644 --- a/sys/arch/kbus/include/ansi.h +++ b/sys/arch/kbus/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.2 1999/02/20 22:43:52 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.3 2000/02/22 17:29:13 millert Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:59 jtc Exp $ */ /*- @@ -75,4 +75,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/m68k/include/ansi.h b/sys/arch/m68k/include/ansi.h index 1a734fe7c00..53c6af36a97 100644 --- a/sys/arch/m68k/include/ansi.h +++ b/sys/arch/m68k/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.5 1997/07/07 05:56:37 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.6 2000/02/22 17:29:13 millert Exp $ */ /* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:52 jtc Exp $ */ /*- @@ -75,4 +75,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/mips/include/ansi.h b/sys/arch/mips/include/ansi.h index ee0365611bd..b9354728e50 100644 --- a/sys/arch/mips/include/ansi.h +++ b/sys/arch/mips/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.3 1999/01/27 04:46:04 imp Exp $ */ +/* $OpenBSD: ansi.h,v 1.4 2000/02/22 17:29:13 millert Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -74,4 +74,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* !_MIPS_ANSI_H_ */ diff --git a/sys/arch/mvme88k/include/ansi.h b/sys/arch/mvme88k/include/ansi.h index d811f61dc0e..4ff6a9f11ea 100644 --- a/sys/arch/mvme88k/include/ansi.h +++ b/sys/arch/mvme88k/include/ansi.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)ansi.h 8.2 (Berkeley) 1/4/94 - * $Id: ansi.h,v 1.7 1999/02/09 06:36:25 smurph Exp $ + * $Id: ansi.h,v 1.8 2000/02/22 17:29:13 millert Exp $ */ #ifndef _ANSI_H_ @@ -79,4 +79,10 @@ #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/pc532/include/ansi.h b/sys/arch/pc532/include/ansi.h index 3dbef15315a..fcdfde20c2e 100644 --- a/sys/arch/pc532/include/ansi.h +++ b/sys/arch/pc532/include/ansi.h @@ -74,4 +74,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/powerpc/include/ansi.h b/sys/arch/powerpc/include/ansi.h index 07a240c928a..8df66fa04f0 100644 --- a/sys/arch/powerpc/include/ansi.h +++ b/sys/arch/powerpc/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.6 1998/05/29 04:15:31 rahnds Exp $ */ +/* $OpenBSD: ansi.h,v 1.7 2000/02/22 17:29:14 millert Exp $ */ /* $NetBSD: ansi.h,v 1.2 1996/11/15 22:38:57 jtc Exp $ */ /*- @@ -75,4 +75,10 @@ struct __va_list_tag; #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/sparc/include/ansi.h b/sys/arch/sparc/include/ansi.h index fce22059951..078e3e270e4 100644 --- a/sys/arch/sparc/include/ansi.h +++ b/sys/arch/sparc/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.6 1997/08/08 08:26:01 downsj Exp $ */ +/* $OpenBSD: ansi.h,v 1.7 2000/02/22 17:29:14 millert Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:59 jtc Exp $ */ /*- @@ -75,4 +75,10 @@ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/arch/vax/include/ansi.h b/sys/arch/vax/include/ansi.h index 6c8d17f049f..5a5f0c64bfb 100644 --- a/sys/arch/vax/include/ansi.h +++ b/sys/arch/vax/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.6 1997/07/07 05:56:43 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.7 2000/02/22 17:29:14 millert Exp $ */ /* $NetBSD: ansi.h,v 1.5 1996/11/15 22:39:01 jtc Exp $ */ /*- @@ -47,8 +47,6 @@ * typedef _SIZE_T_ size_t; * #undef _SIZE_T_ * #endif - * - * Thanks, ANSI! */ #define _BSD_CLOCK_T_ unsigned long /* clock() */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ @@ -56,10 +54,31 @@ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ #define _BSD_VA_LIST_ char * /* va_list */ -#define _BSD_WCHAR_T_ int /* wchar_t */ -#define _BSD_WINT_T_ int /* wint_t */ #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int +/* + * Runes (wchar_t) is declared to be an ``int'' instead of the more natural + * ``unsigned long'' or ``long''. Two things are happening here. It is not + * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, + * it looks like 10646 will be a 31 bit standard. This means that if your + * ints cannot hold 32 bits, you will be in trouble. The reason an int was + * chosen over a long is that the is*() and to*() routines take ints (says + * ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you + * lose a bit of ANSI conformance, but your programs will still work. + * + * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t + * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains + * defined for ctype.h. + */ +#define _BSD_WCHAR_T_ int /* wchar_t */ +#define _BSD_WINT_T_ int /* wint_t */ +#define _BSD_RUNE_T_ int /* rune_t */ + +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ #endif /* _ANSI_H_ */ diff --git a/sys/arch/wgrisc/include/ansi.h b/sys/arch/wgrisc/include/ansi.h index 7b5a99d23ec..79657796abb 100644 --- a/sys/arch/wgrisc/include/ansi.h +++ b/sys/arch/wgrisc/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.5 1997/07/07 05:56:44 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.6 2000/02/22 17:29:14 millert Exp $ */ /* $NetBSD: ansi.h,v 1.5 1994/10/26 21:09:33 cgd Exp $ */ /*- @@ -72,6 +72,13 @@ * defined for ctype.h. */ #define _BSD_WCHAR_T_ int /* wchar_t */ +#define _BSD_WINT_T_ int /* wint_t */ #define _BSD_RUNE_T_ int /* rune_t */ +/* + * We describe off_t here so its declaration can be visible to + * stdio without pulling in all of <sys/type.h>, thus appeasing ANSI. + */ +#define _BSD_OFF_T_ long long /* file offset */ + #endif /* _ANSI_H_ */ diff --git a/sys/sys/types.h b/sys/sys/types.h index 065f5a51b39..76d1d143d5a 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.15 1999/02/15 18:53:57 millert Exp $ */ +/* $OpenBSD: types.h,v 1.16 2000/02/22 17:29:12 millert Exp $ */ /* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ /*- @@ -75,7 +75,6 @@ typedef u_int32_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ typedef u_int16_t mode_t; /* permissions */ typedef u_int16_t nlink_t; /* link count */ -typedef quad_t off_t; /* file offset */ typedef int32_t pid_t; /* process id */ typedef quad_t rlim_t; /* resource limit */ typedef int32_t segsz_t; /* segment size */ @@ -96,29 +95,6 @@ typedef u_int16_t in_port_t; /* IP port type */ typedef u_int8_t sa_family_t; /* sockaddr address family type */ typedef u_int32_t socklen_t; /* length type for network syscalls */ -/* - * These belong in unistd.h, but are placed here too to ensure that - * long arguments will be promoted to off_t if the program fails to - * include that header or explicitly cast them to off_t. - */ -#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) -#ifndef _KERNEL -#include <sys/cdefs.h> -__BEGIN_DECLS -off_t lseek __P((int, off_t, int)); -int ftruncate __P((int, off_t)); -int truncate __P((const char *, off_t)); -__END_DECLS -#endif /* !_KERNEL */ -#endif /* !defined(_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)) -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) -#endif - #ifdef _BSD_CLOCK_T_ typedef _BSD_CLOCK_T_ clock_t; #undef _BSD_CLOCK_T_ @@ -149,6 +125,34 @@ typedef _BSD_TIMER_T_ timer_t; #undef _BSD_TIMER_T_ #endif +#ifdef _BSD_OFF_T_ +typedef _BSD_OFF_T_ off_t; +#undef _BSD_OFF_T_ +#endif + +/* + * These belong in unistd.h, but are placed here too to ensure that + * long arguments will be promoted to off_t if the program fails to + * include that header or explicitly cast them to off_t. + */ +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) +#ifndef _KERNEL +#include <sys/cdefs.h> +__BEGIN_DECLS +off_t lseek __P((int, off_t, int)); +int ftruncate __P((int, off_t)); +int truncate __P((const char *, off_t)); +__END_DECLS +#endif /* !_KERNEL */ +#endif /* !defined(_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)) +#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) +#endif + #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) #define NBBY 8 /* number of bits in a byte */ |