Re: time_t and OS/2 EMX

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 01 Jan 1999 19:11:15 +0100

Doug Nazar wrote:

> For instance, under EMX, time_t is a unsigned long which causes
> problems, notably with helper timeouts (ie. multiple dns queries).
> I've changed my header files to define time_t as a signed long. Is
> it universally accepted that time_t is signed or should I patch
> squid instead?

I think the general definition of time_t is signed to allow computation
with time_t differences, but I am not sure if this is defined in any
standard. In my C reference book time_t is defined as "a type that can
represent calendar time", but it also says that time() which returns a
time_t returns -1 on error.. But regardless of this, if Squid could be
changed to not assume that time_t is signed then that would be a small
plus on the portability side.

size_t is a different beast. It may be (and usually is) unsigned. size_t
differences are of type off_t, to allow coputations with differences.

---
Henrik Nordstrom
Spare time Squid hacker
Received on Tue Jul 29 2003 - 13:15:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:02 MST