than embedding a copy. Discussed upstream but was not desired.
History:
+r9: fix another compile error without --with-system-tzdata configured
r8: fix compile error without --with-system-tzdata configured
r7: improve check for valid timezone id to exclude directories
r6: fix fd leak in r5, fix country code/BC flag use in
/* read BC flag */
tz->bc = (**tzf == '\1');
*tzf += 1;
-@@ -256,7 +276,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -256,7 +276,397 @@
}
}
{
int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
-@@ -295,36 +705,125 @@ static int seek_to_tz_position(const uns
+@@ -295,36 +705,128 @@
return 0;
}
+ char **map, size_t *maplen,
+ const timelib_tzdb *tzdb)
+{
++#ifdef HAVE_SYSTEM_TZDATA
+ if (tzdb == timezonedb_system) {
+ char *orig;
+
+
+ return 1;
+ }
-+ else {
++ else
++#endif
++ {
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
+ }
+}
}
--- a/ext/date/lib/timelib.m4
+++ b/ext/date/lib/timelib.m4
-@@ -78,3 +78,17 @@ stdlib.h
+@@ -78,3 +78,17 @@
dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll strftime)