size_t (was: A lint question)
Chris Torek
chris at mimsy.UUCP
Wed Nov 30 06:14:15 AEST 1988
In article <766 at quintus.UUCP> ok at quintus.uucp (Richard A. O'Keefe) writes:
>size_t is an unsigned integral type (except in BSD systems, where it's "int").
The only `size_t' appearing in any 4BSD release is in <sys/types.h>.
I have copied this from the 4.0BSD release (where the file was not even
called types.h---this is from /usr/src/sys/h/param.h), dated no later
than 1980, i.e., before ANSI C committees were even even a gleam in
someone's eyes:
typedef struct { int r[1]; } * physadr;
typedef int daddr_t;
typedef char * caddr_t;
typedef unsigned short ino_t;
typedef int swblk_t;
typedef int size_t;
typedef int time_t;
typedef int label_t[14];
typedef short dev_t;
typedef int off_t;
Whether size_t should have been `unsigned int' even then is another
question entirely. The point, however, is that the size_t found in
4BSD is not related to the size_t found in the dpANS, and hence not
conformant.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list