[medusa] Medusa on Macintosh [long]

Samuel Reynolds reynol@p...
Fri, 23 Feb 2001 08:14:04 -0700


>I reverted to the original code (except for the date
>coercions)

To clarify about the date coercions (and get them into
the archive):

On Unix and Windows, the date epoch is 1970. For dates
from this epoch, it's safe to coerce times to ints.
On the Mac, on the other hand, the epoch is 1907.
As a result, an attempt to coerce to int results in a
range overflow. Instead, coerce to long. In particular:

o Change all instances of [ int(time.time()) ]
to [ long(time.time())] ].

o Change all instances of [ int(time.mktime()) ]
to [ long(time.mktime()) ].

In the medusa-src-20000601 tarball, this affects the files
eventloop.py, http_date.py, http_server.py, resolver.py,
and status_handler.py.

Sam Rushing has suggested that there are other date issues,
as well, that I haven't run into.

- Sam
________________________________________
Samuel Reynolds
Spinward Stars: http://www.spinwardstars.com/
Reynolds Virtual Workshop: http://www.primenet.com/~reynol
reynol@p...
samuel_reynolds@c...