[M3devel] utime.i3 and imported data

Jay jayk123 at hotmail.com
Tue Feb 12 17:27:38 CET 2008


sorry, still not a bad idea, but not where my crash is.
I wasn't paying close enough attention. Those aren't used on NT386GNU.
The crash is probably here:
 
C:\dev2\cm3.2\m3-libs\m3core\src\time\posix\DateBsd.m3(47):      date.zone    := M3toC.CopyStoT (tm.tm_zone);
I don't know why yet. (meta reason -- these time formats aren't worthwhile even if forward slashes in paths and X Windows are....)
 
 - Jay


From: jayk123 at hotmail.comTo: m3devel at elegosoft.comDate: Tue, 12 Feb 2008 15:57:25 +0000Subject: [M3devel] utime.i3 and imported data


For good reason, imported (dynamically linked) data doesn't work great on Win32.Functions work much better. Data can work, but you generally need the header to say __declspec(dllimport), to change it to a declaration of a pointer. I've seen GNU ld has some workaround but I'm not familiar with it, it doesn't worthwhile to me, and I'm having a problem. I strongly suggest all the Utime.i3: <*EXTERNAL*> VAR timezone: time_t;<*EXTERNAL*> VAR daylight: int;<*EXTERNAL*> VAR tzname: ARRAY [0..1] OF char_star;be changed to functions: <*EXTERNAL Utime__get_timezone*> get_timezone(): time_t;<*EXTERNAL Utime__get_daylight*> get_daylight(): int;<*EXTERNAL Utime__get_tzname*> get_tzname(a: [0..1]): char_star; with an implementation in C: UtimeC.c#include <time.h>time_t Utime__get_timezone(void){    return timezone;} int Utime__get_daylight(void){    return daylight;} char* Utime__get_tzname(unsigned a){    return tzname[a];}for now I'm going to try another workaround..where NT386GNU has this data as not external and some C code to call tzset and then copy the data from the C globals to Modula-3 globals. The datetime feature I added to Quake is crashing, I think due to this...  - Jay

Shed those extra pounds with MSN and The Biggest Loser! Learn more. 
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080212/bfc36a92/attachment-0002.html>


More information about the M3devel mailing list