[1506] in Coldmud discussion meeting

root meeting help first previous next last

borland-c/time/win32 evilness

daemon@ATHENA.MIT.EDU (Thu Dec 2 10:32:44 1999 )

Date: Thu, 02 Dec 1999 10:15:22 -0500
From: Nobody <psyclone42@geocities.com>
To: coldstuff@cold.org
Reply-To: coldstuff@cold.org

well, a few weeks ago i was messing around and happened to execute
;ctime(-1) on a 1.1.6-STABLE-i386-unknown-win32 genesis, and much to my
surprise, the site died. much time passes, along with pestering those
who know more about that particular build. a few minutes ago, i noticed
in src/modules/cdc_misc.c:

#ifdef __BORLANDC__
    if (argc == 2) {
        if (INT2 < 18000) {
         "Borland's time util is broken, and requires time values above
        tt = (time_t) INT2;
    } else {

and thought, aha, my problem is solved. so, lacking access to a win32
compiler, i made this little proto-patch, and am wondering if it works
at all. so, please, people who can compile it, tell me if this works and
test ctime() and localtime() with small numbers to make sure they crash
and that this workaround is needed. thanks..