[comp.lang.c] Safe to use *_t typedefs?

cox@bentley.UUCP (MH Cox) (03/16/88)

I need some advice, preferrably from some one on the ANSI committee
(are you listenin' Gwyn?).  The proposed ANSI standard C has produced
a lot of new data types:  size_t, time_t, etc.  I was starting to
adopt their "_t" convention for my own data types, when
I suddenly realized (excuse me, if this is obvious to everyone
else :-) I might be headed for a type clash with a future
ANSI C typedef.  Did the ANSI C committe intend to reserve all
typedefs of the form *_t for their own use?  Should I
avoid typedefs of this form in my applications?

-- 

==========================================================================
Michael H. Cox			ARPA:  moss!bentley!cox@rutgers.edu
AT&T Bell Labs			UUCP:  don't know (can anyone help?)
184 Liberty Corner Road
Rm 3B-Q15
Warren, NJ  07060
(201) 580-8622
==========================================================================

dsill@NSWC-OAS.arpa (Dave Sill) (03/17/88)

In article <1086@bentley.UUCP> MH Cox <bentley!cox> writes:
>The proposed ANSI standard C has produced
>a lot of new data types:  size_t, time_t, etc.

[This is not an answer to the posters question.]

A caveat: be careful when using variables of these generic types in
portable code.  time_t may be int on machine X but long int on machine
Y.  We recently ported some UNIX accounting code that had this
problem.

=========
The opinions expressed above are mine.

"[Programmers who prefer to drive a shift car are not] positioned to
design interactive systems."
					-- Ted Nelson (quoted from Byte)

[But Ted, there are users who really prefer a shift car...]