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 <sys/types.h> (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.
This commit is contained in:
Bruce Evans 1995-06-28 01:39:26 +00:00
parent 6acceb40dc
commit e9c2b07f51

View File

@ -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 */
/*