Skip to content
Myr

Fix strftime-related functions on NetBSD. (#3579)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Klausner · committed by GitHub · parent fbee8f4 · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:src/builtin.c+6 added
1851 unmodified lines
1852 /* Solaris moreover needs call to tzset to take the changed environment into1853 * account ... */1854 tzset();1855#endif1856#ifdef __NetBSD__1857 timezone_t tz_utc = tzalloc("UTC");1858 size_t n = strftime_z(tz_utc, buf, max_size, fmt, &tm);1859 tzfree(tz_utc);1860#else1861 size_t n = strftime(buf, max_size, fmt, &tm);1862#endif1863#if defined(__APPLE__) || defined(__sun)1864 if (tz) {1865 setenv("TZ", tz, 1);1866 free(tz);
297 unmodified lines