diff --git a/configure b/configure index d8e947a..db30f42 100755 --- a/configure +++ b/configure @@ -1,3 +1,5 @@ + + #!/bin/sh # # Copyright (c) 2015 Carsten Larsen @@ -177,7 +179,7 @@ if $VALID ; then echo "LDLIBS = -lm" elif [ -n "$1" ] && [ $1 = "AROS" ] ; then echo 'CC = gcc' - echo "CFLAGS = -O2 -DAROS -I. -Iinclude -Wall -Werror" + echo "CFLAGS = -O2 -DAROS -DWITHTEST -I. -Iinclude -Wall -Werror" echo "LDLIBS = -lm" else echo "CFLAGS = -O2 -Wall -DWITHTEST -Werror" diff --git a/ntimed_platform.h b/ntimed_platform.h index e2ef4ee..dc73a23 100644 --- a/ntimed_platform.h +++ b/ntimed_platform.h @@ -27,7 +27,7 @@ #define NTIMED_PLATFORM_H //--------------------------------------------------------------------------// #if defined(AROS) || defined(AOS3) -# define AMIGA_VERSION " 1.04 (25.07.2015)" +# define AMIGA_VERSION " 1.05 (26.07.2015)" # ifndef AMIGA # define AMIGA # endif diff --git a/ocx_stdio.c b/ocx_stdio.c index 3845120..1511d8b 100644 --- a/ocx_stdio.c +++ b/ocx_stdio.c @@ -72,6 +72,9 @@ # include "clib/timezone_protos.h" # include "inline/timezone.h" #endif +#ifdef AROS +# include +#endif int repeat_trace = 0; @@ -173,6 +176,7 @@ PutHex(struct ocx *ocx, enum ocx_chan chan, const void *ptr, ssize_t len) void PutTime(struct ocx *ocx, enum ocx_chan chan, const char *fmt, const struct timestamp *ts) { +#ifdef AMIGA FILE *dst; struct tm tm; static char buf[80]; @@ -188,6 +192,7 @@ PutTime(struct ocx *ocx, enum ocx_chan chan, const char *fmt, const struct times fflush(dst); } } +#endif } void diff --git a/time_amiga.c b/time_amiga.c index 5d90b62..25e816c 100644 --- a/time_amiga.c +++ b/time_amiga.c @@ -48,6 +48,9 @@ # include "clib/timezone_protos.h" # include "inline/timezone.h" #endif +#ifdef AROS +# include +#endif // -------------------------------------------------------------------------- // // 2922 is the number of days between 1.1.1970 and 1.1.1978 // (2 leap years and 6 normal) @@ -189,9 +192,9 @@ void amiga_init_offset() now = time(NULL); localtime_r(&now, &tm); gmtoffset = tm.tm_gmtoff; - abbr = tm.tm_zone; + abbr = (char*)tm.tm_zone; } else { - gmtoffset = locale->loc_GMTOffset * 60 * 60; + gmtoffset = locale->loc_GMTOffset * 60; abbr = '\0'; } @@ -201,9 +204,9 @@ void amiga_init_offset() "Time zone is GMT %s %.f%s%s%s", (gmtoffset >= 0.0 ? "+" : "-"), fabs((float)gmtoffset / 60.0 / 60.0), - (abbr != '\0' ? " (" : '\0'), - (abbr != '\0' ? abbr : '\0'), - (abbr != '\0' ? ")" : '\0') + (abbr != '\0' ? " (" : ""), + (abbr != '\0' ? abbr : ""), + (abbr != '\0' ? ")" : "") ); } @@ -288,7 +291,7 @@ void amiga_save_time(void) struct tm tm; struct timeval tv; int gmtoffset = 0; - char *message = '\0'; + char *message = ""; // Assume HW clock is in GMT if timezone library is present if (TimezoneBase) {