<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
diff attached<BR><BR> <BR>> Date: Thu, 15 Apr 2010 13:44:28 +0000<BR>> To: m3commit@elegosoft.com<BR>> From: jkrell@elego.de<BR>> Subject: [M3commit] CVS Update: cm3<BR>> <BR>> CVSROOT: /usr/cvs<BR>> Changes by: jkrell@birch. 10/04/15 13:44:28<BR>> <BR>> Modified files:<BR>> cm3/m3-libs/m3core/src/: m3core.h <BR>> cm3/m3-libs/m3core/src/time/POSIX/: DatePosix.m3 DatePosixC.c <BR>> TimePosix.i3 TimePosix.m3 <BR>> TimePosixC.c m3makefile <BR>> cm3/m3-libs/m3core/src/unix/: m3makefile <BR>> cm3/m3-libs/m3core/src/unix/Common/: Unix.i3 Utime.i3 UtimeC.c <BR>> Utypes.i3 <BR>> Added files:<BR>> cm3/m3-libs/m3core/src/time/POSIX/: DatePosix.i3 <BR>> <BR>> Log message:<BR>> eliminate struct_tm (somewhat platform specific)<BR>> eliminate struct_timeval (somewhat platform specific)<BR>> eliminate FDSet (somewhat platform specific)<BR>> eliminate MAX_FDSET (somewhat platform specific)<BR>> eliminate lots of functions from Utime<BR>> i.e. functions that use those types, like gettimeofday, localtime, gmtime<BR>> functions that were used only in m3core/src/time/*.m3 like get_timezone, altzone<BR>> <BR>> eliminate "all" the m3core/src/unix platform dependent directories *except*<BR>> Solaris/sparc32 (SOLgnu/SOLsun) for stack walking support<BR>> uin-common vs. uin-len<BR>> <BR>> change time_t to be 64bits for all platforms<BR>> but underlying implementation still needs work (elaborated below)<BR>> <BR>> tested on SOLgnu, AMD64_DARWIN, LINUXLIBC6<BR>> It compiles and the assertions all hold.<BR>> Local and utc data appears correct, cross checking with date and date -u, including<BR>> setting Linux/x86 and Solaris/sparc32 system clocks back to Jan 1 2010.<BR>> Did not test functionaly on Darwin or any BSD (but note that Linux uses the BSD code).<BR>> <BR>> still to do:<BR>> use 64bit time_t code from http://code.google.com/p/y2038/<BR>> combine some of lingering code in UtimeC.c into Time/DatePosixC.c, as static functions<BR>> We can actually add stuff back like localtime/gmtime trafficing in 64bit time_t,<BR>> as long as we use our own carefully controlled/copied types (i.e. omit the<BR>> extra two fields in struct tm). Just as well as we can provide gettimeofday, select. If we must.<BR>> Maybe test on Darwin, *BSD, Cygwin, Interix, etc.<BR>> Test in other timezones.<BR>> Enable a regularly run test?<BR>> Consider relayout Date.T to it doesn't have padding in the middle or perhaps anywhere.<BR>> (Hard to avoid if there are subranges, will be padded at least at end.)<BR>> <BR>> We can't achieve 64bit gettimeofday or file timestamps beyond year 2038<BR>> but if you fill in a Date.T with year > 2038, that can be useful and be made<BR>> to work. It should roundtrip with Time.T and be printable.<BR>> <BR>> structure is a little odd<BR>> DatePosix.i3, TimePosix.i3 describe C code<BR>> DatePosix.m3, TimePosix.m3 expose Date, Time, call into DatePosix, TimePosix<BR>> This is just to reuse existing names or name patterns.<BR>> We could just as well introduce new interfaes TimeC, DateC, TimeInternal, DateTimeInternal, etc.<BR>> <BR>> Note: This also fixes the UTC timezone on Solaris, Interix, HP-UX, Cygwin, which appear to have been historically broken.<BR>> <BR>> Note: This also uncovered that my Solaris clock was behind by a few minutes.<BR>> <BR>                                        </body>
</html>