[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time_t long vs int



I have been trying to compile a few programs which use time(3) as type long.
Looking through the /usr/include files I see time is type time_t, which is type
_BSD_TIME_T_, which is an int.  Of course, using time as type long causes
an error. I also looked for what type long was but I did not see a define or
typedef statement which defined long.  My VERY LIMITED C knowledge tells me
there is no type long, but long ints, long doubles... Which brings up a
few questions:  Is there a difference between long and int?  If there
isn't then why does the compiler choke when long is used? What is type
long?  Sorry if this question is too basic, but other versions of gcc
(FreeBSD, Ultrix, Digital Unix, linuxppc...) don't seem to mind the long
type and it has been bothering my as to why that is. Thanks for any
info.

Aaron Jackson		jackson_(_at_)_msrce_(_dot_)_howard_(_dot_)_edu

Visit your host, monkey.org