Re: parrot no longer compiles on win32
Goplat <[EMAIL PROTECTED]> wrote: > --- Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> Goplat <[EMAIL PROTECTED]> wrote: >> > ops/sys.ops:169: warning: implicit declaration of function `gmtime_r' >> > ops/sys.ops:170: warning: implicit declaration of function `asctime_r' >> > ops/sys.ops:178: warning: implicit declaration of function `localtime_r' >> >> > msvcrt doesn't have these functions (it uses thread-local storage to make >> > the traditional functions thread safe) >> >> I've moved these functions now all to platform/generic/time.c with a >> C prefix, so that people can implement proper wrappers around >> in their relevant platform subdir. > Thanks, with that and the attached patch to add said wrappers (and include > time.h) parrot compiles once again. Thanks, applied. leo
Re: parrot no longer compiles on win32
--- Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Goplat <[EMAIL PROTECTED]> wrote: > > ops/sys.ops:169: warning: implicit declaration of function `gmtime_r' > > ops/sys.ops:170: warning: implicit declaration of function `asctime_r' > > ops/sys.ops:178: warning: implicit declaration of function `localtime_r' > > > msvcrt doesn't have these functions (it uses thread-local storage to make > > the traditional functions thread safe) > > I've moved these functions now all to platform/generic/time.c with a > C prefix, so that people can implement proper wrappers around > in their relevant platform subdir. > > leo Thanks, with that and the attached patch to add said wrappers (and include time.h) parrot compiles once again. __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com--- config/gen/platform/win32/time.c~ Thu Feb 19 09:06:20 2004 +++ config/gen/platform/win32/time.cSun Mar 14 09:03:18 2004 @@ -39,3 +39,35 @@ { Sleep(seconds * 1000); } + +/* + * Parrot_gmtime_r() + */ + +struct tm * +Parrot_gmtime_r(const time_t *t, struct tm *tm) +{ +*tm = *gmtime(t); +return tm; +} + +/* + * Parrot_localtime_r() + */ + +struct tm * +Parrot_localtime_r(const time_t *t, struct tm *tm) +{ +*tm = *localtime(t); +return tm; +} + +/* + * Parrot_asctime_r() + */ + +char* +Parrot_asctime_r(const struct tm *tm, char *buffer) +{ +return strcpy(buffer, asctime(tm)); +} --- include/parrot/parrot.h~Sat Feb 21 10:09:38 2004 +++ include/parrot/parrot.h Sun Mar 14 08:49:40 2004 @@ -75,6 +75,10 @@ # include #endif +#ifdef PARROT_HAS_HEADER_TIME +# include +#endif + #ifdef PARROT_HAS_HEADER_MATH # include #endif
Re: parrot no longer compiles on win32
Goplat <[EMAIL PROTECTED]> wrote: > ops/sys.ops:169: warning: implicit declaration of function `gmtime_r' > ops/sys.ops:170: warning: implicit declaration of function `asctime_r' > ops/sys.ops:178: warning: implicit declaration of function `localtime_r' > msvcrt doesn't have these functions (it uses thread-local storage to make the > traditional functions thread safe) I've moved these functions now all to platform/generic/time.c with a C prefix, so that people can implement proper wrappers around in their relevant platform subdir. leo
parrot no longer compiles on win32
The latest cvs of parrot fails to compile on mingw32, In file included from include/parrot/parrot.h:258, from src/utils.c:23: include/parrot/misc.h:44: warning: `struct tm' declared inside parameter list include/parrot/misc.h:44: warning: its scope is only this definition or declaration, which is probably not what you want src/utils.c:633: warning: `struct tm' declared inside parameter list src/utils.c:634: conflicting types for `tm_to_array' include/parrot/misc.h:44: previous declaration of `tm_to_array' src/utils.c: In function `tm_to_array': src/utils.c:637: dereferencing pointer to incomplete type configure didn't define PARROT_HAS_HEADER_SYSTIME, even though I do have sys/time.h. I also have time.h, PARROT_HAS_HEADER_TIME is defined but nothing seems to uses it... ops/sys.ops: In function `Parrot_gmtime_s_i': ops/sys.ops:169: warning: implicit declaration of function `gmtime_r' ops/sys.ops:170: warning: implicit declaration of function `asctime_r' ops/sys.ops: In function `Parrot_localtime_s_i': ops/sys.ops:178: warning: implicit declaration of function `localtime_r' msvcrt doesn't have these functions (it uses thread-local storage to make the traditional functions thread safe) __ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com