--- sysdep.c.orig 2003-11-18 18:23:20.000000000 +0000 +++ sysdep.c 2003-11-27 20:47:44.000000000 +0000 @@ -159,6 +159,11 @@ static const char *mode_append_binary_plus = "a+b"; const char __gnat_text_translation_required = 1; +#ifdef __DJGPP__ +#include +#define _setmode setmode +#endif + void __gnat_set_binary_mode (int handle) { @@ -704,6 +709,26 @@ /* __gnat_localtime_r is not needed on NT and VMS */ #else +#if defined (__DJGPP__) + +/* FIXME: this is draft version only. Fix me if that is not correct */ +/* or not complete (AP) */ + +extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, struct tm *)); + +struct tm * +__gnat_localtime_r (timer, tp) + const time_t *timer; + struct tm *tp; +{ + struct tm *tmp; + + tmp = localtime (timer); + memcpy (tp, tmp, sizeof (struct tm)); + return tp; +} + +#else /* All other targets provide a standard localtime_r */ @@ -717,3 +742,4 @@ #endif #endif #endif +#endif