Why have xxx_t typedef names

Doug Gwyn gwyn at smoke.brl.mil
Sat Feb 9 07:33:30 AEST 1991


In article <23133 at netcom.COM> avery at netcom.COM (Avery Colter) writes:
>gwyn at smoke.brl.mil (Doug Gwyn) writes:
>>systems that have <sys/types.h> (e.g. POSIX ones) generally allow the
>Hmmmm, must mean ORCA/C is a POSIX compiler. I do know the <types.h>
>in that one mainly defines types of use to the native toolbox,
>while the _t types are mainly scattered throughout the header files
>which use them the most, i.e. time_t and clock_t in <time.h>,
>div_t and ldiv_t in <math.h>, etc.

Aargh!  <sys/types.h> and <Types.h> are NOT synonymous.  ORCA/C does
not provide <sys/types.h>.  ANSI C requires that certain *_t types
be defined in certain standard headers, and as an honest attempt at
a conforming implementation, ORCA/C does just that.  Note that APW
<Types.h> follows no canonical pattern in the name space that it
usurps, unlike the *_t convention (mostly) followed by POSIX
<sys/types.h>.  (There are some "modifier" patterns for denoting
derived types such as "pointer to" and "handle for".)



More information about the Comp.lang.c mailing list