Revision 1.05 changes
This commit is contained in:
parent
c086e3bea2
commit
e966ac7d55
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -72,6 +72,9 @@
|
|||
# include "clib/timezone_protos.h"
|
||||
# include "inline/timezone.h"
|
||||
#endif
|
||||
#ifdef AROS
|
||||
# include <time.h>
|
||||
#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
|
||||
|
|
15
time_amiga.c
15
time_amiga.c
|
@ -48,6 +48,9 @@
|
|||
# include "clib/timezone_protos.h"
|
||||
# include "inline/timezone.h"
|
||||
#endif
|
||||
#ifdef AROS
|
||||
# include <time.h>
|
||||
#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) {
|
||||
|
|
Loading…
Reference in New Issue