From e9c2b07f51a88bc2249123e404ca3aa4ef3cff6d Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 28 Jun 1995 01:39:26 +0000 Subject: [PATCH] Define macros _BSD_OFF_T_ and _BSD_PID_T_ suitable for use instead of the typedefs off_t and pid_t when use of the latter would cause namespace pollution. These macros are used like _BSD_VA_LIST_ and aren't #undef'ed when the corresponding typedef is declared. off_t is very machine-dependent and should never have been decided in (its declaration is compiler-dependent). pid_t isn't very machine-dependent, but this might change. `long' is a wasteful type for it if longs are longer than ints. Move the definition of _BSD_VA_LIST_ away from the comment that suggests that it is #undefed when va_list is declared. --- sys/i386/include/ansi.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h index 601b0dfbfd53..f5f71debe901 100644 --- a/sys/i386/include/ansi.h +++ b/sys/i386/include/ansi.h @@ -31,15 +31,15 @@ * SUCH DAMAGE. * * @(#)ansi.h 8.2 (Berkeley) 1/4/94 - * $Id: ansi.h,v 1.6 1995/02/03 21:23:46 bde Exp $ + * $Id: ansi.h,v 1.7 1995/05/30 08:00:22 rgrimes Exp $ */ #ifndef _MACHINE_ANSI_H_ #define _MACHINE_ANSI_H_ /* - * Types which are fundamental to the implementation and may appear in - * more than one standard header are defined here. Standard headers + * Types which are fundamental to the implementation and must be declared + * in more than one standard header are defined here. Standard headers * then use: * #ifdef _BSD_SIZE_T_ * typedef _BSD_SIZE_T_ size_t; @@ -51,6 +51,15 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ long /* time() */ + +/* + * Types which are fundamental to the implementation and must be used + * in more than one standard header although they are only declared in + * one (perhaps nonstandard) header are defined here. Standard headers + * use _BSD_XXX_T_ without undef'ing it. + */ +#define _BSD_OFF_T_ long long /* file offset */ +#define _BSD_PID_T_ long /* process [group] */ #define _BSD_VA_LIST_ char * /* va_list */ /*