This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11620] Bad design of timezone conversions
- From: "maxim.yegorushkin at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 25 Nov 2014 10:26:49 +0000
- Subject: [Bug libc/11620] Bad design of timezone conversions
- Auto-submitted: auto-generated
- References: <bug-11620-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=11620
--- Comment #8 from Maxim Yegorushkin <maxim.yegorushkin at gmail dot com> ---
Upstream tz project exposes the functions required for easy and thread-save
timezone conversions, see
https://github.com/eggert/tz/blob/master/private.h#L409
/*
** Define functions that are ABI compatible with NetBSD but have
** better prototypes. NetBSD 6.1.4 defines a pointer type timezone_t
** and labors under the misconception that 'const timezone_t' is a
** pointer to a constant. This use of 'const' is ineffective, so it
** is not done here. What we call 'struct state' NetBSD calls
** 'struct __state', but this is a private name so it doesn't matter.
*/
#if NETBSD_INSPIRED
typedef struct state *timezone_t;
struct tm *localtime_rz(timezone_t restrict, time_t const *restrict, struct
tm *restrict);
time_t mktime_z(timezone_t restrict, struct tm *restrict);
timezone_t tzalloc(char const *);
void tzfree(timezone_t);
/* ... */
#endif
Would it be possible to expose these NETBSD_INSPIRED 4 functions in glibc?
-- Maxim
--
You are receiving this mail because:
You are on the CC list for the bug.