mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-23 00:39:33 +00:00
Allow -Dtime_tz=... libs alongside standard libs
Allow libraries built with -Dtime_tz=... to be used in executables that also use standard-library time_t and libraries. (Problem reported by Bradley White.) * NEWS: Document this. * private.h (localtime_rz, mktime_rz, posix2time_z, time2posix_z) (tzalloc, tzfree, tzset, tzsetwall) [time_tz]: Define to tz_localtime_rz etc., so that these functions can be used in the same executable as standard functions with standard time_t. (tzset, tzsetwall) [time_tz]: Declare, so that the tz_-prefixed version ins declared.
This commit is contained in:
19
private.h
19
private.h
@ -324,16 +324,24 @@ typedef time_tz tz_time_t;
|
||||
# define localtime tz_localtime
|
||||
# undef localtime_r
|
||||
# define localtime_r tz_localtime_r
|
||||
# undef localtime_rz
|
||||
# define localtime_rz tz_localtime_rz
|
||||
# undef mktime
|
||||
# define mktime tz_mktime
|
||||
# undef mktime_z
|
||||
# define mktime_z tz_mktime_z
|
||||
# undef offtime
|
||||
# define offtime tz_offtime
|
||||
# undef posix2time
|
||||
# define posix2time tz_posix2time
|
||||
# undef posix2time_z
|
||||
# define posix2time_z tz_posix2time_z
|
||||
# undef time
|
||||
# define time tz_time
|
||||
# undef time2posix
|
||||
# define time2posix tz_time2posix
|
||||
# undef time2posix_z
|
||||
# define time2posix_z tz_time2posix_z
|
||||
# undef time_t
|
||||
# define time_t tz_time_t
|
||||
# undef timegm
|
||||
@ -342,6 +350,14 @@ typedef time_tz tz_time_t;
|
||||
# define timelocal tz_timelocal
|
||||
# undef timeoff
|
||||
# define timeoff tz_timeoff
|
||||
# undef tzalloc
|
||||
# define tzalloc tz_tzalloc
|
||||
# undef tzfree
|
||||
# define tzfree tz_tzfree
|
||||
# undef tzset
|
||||
# define tzset tz_tzset
|
||||
# undef tzsetwall
|
||||
# define tzsetwall tz_tzsetwall
|
||||
|
||||
char *ctime(time_t const *);
|
||||
char *ctime_r(time_t const *, char *);
|
||||
@ -352,6 +368,7 @@ struct tm *localtime(time_t const *);
|
||||
struct tm *localtime_r(time_t const *restrict, struct tm *restrict);
|
||||
time_t mktime(struct tm *);
|
||||
time_t time(time_t *);
|
||||
void tzset(void);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -370,7 +387,7 @@ extern char * asctime_r(struct tm const *restrict, char *restrict);
|
||||
*/
|
||||
|
||||
#ifdef STD_INSPIRED
|
||||
# if !defined tzsetwall
|
||||
# if !defined tzsetwall || defined time_tz
|
||||
void tzsetwall(void);
|
||||
# endif
|
||||
# if !defined offtime || defined time_tz
|
||||
|
||||
Reference in New Issue
Block a user