2017-11-28 Paul Eggert <eggert@cs.ucla.edu>
+ Port better to CentOS 5
+ Problems reported by Tom G. Christensen in:
+ https://lists.gnu.org/r/bug-gnulib/2017-11/msg00053.html
+ * doc/glibc-functions/strverscmp.texi (strverscmp):
+ Document strverscmp bug with glibc 2.9 and earlier.
+ * doc/posix-functions/tzset.texi (tzset):
+ Document that TZ with angle brackets is POSIX-2001 and later.
+ * tests/test-nstrftime.c: Include unistd.h.
+ (TZ_ANGLE_BRACKETS_SHOULD_WORK): New macro.
+ (TZ): Use it to skip tests with angle brackets in TZ,
+ for older systems.
+
stat: add missing module dependencies
* modules/lstat, modules/stat, modules/utimensat (Depends-on):
Add stat-time.
#include <errno.h>
#include <stdio.h>
-#include <time.h>
#include <string.h>
+#include <time.h>
+#include <unistd.h>
#include "macros.h"
#define STREQ(a, b) (strcmp (a, b) == 0)
+/* Support for settings like TZ='<+00>0' was added in IEEE Std 1003.1-2001. */
+#define TZ_ANGLE_BRACKETS_SHOULD_WORK (200112 <= _POSIX_VERSION)
+
struct posixtm_test
{
time_t in;
{ TZ+CentEur, 0, "1970-01-01 01:00:00 +0100 (CET)", 0 },
{ TZ+Japan , 0, "1970-01-01 09:00:00 +0900 (JST)", 0 },
{ TZ+NZ , 0, "1970-01-01 13:00:00 +1300 (NZDT)", 1 },
- { TZ+Unknown, 0, "1970-01-01 00:00:00 -0000 (-00)", 0 },
{ TZ+Pacific, 500000001, "1985-11-04 16:53:21 -0800 (PST)", 0 },
{ TZ+Arizona, 500000001, "1985-11-04 17:53:21 -0700 (MST)", 0 },
{ TZ+UTC , 500000001, "1985-11-05 00:53:21 +0000 (UTC)", 0 },
{ TZ+CentEur, 500000001, "1985-11-05 01:53:21 +0100 (CET)", 1 },
{ TZ+Japan , 500000001, "1985-11-05 09:53:21 +0900 (JST)", 0 },
{ TZ+NZ , 500000001, "1985-11-05 13:53:21 +1300 (NZDT)", 0 },
- { TZ+Unknown, 500000001, "1985-11-05 00:53:21 -0000 (-00)", 0 },
{ TZ+Pacific, 1000000002, "2001-09-08 18:46:42 -0700 (PDT)", 0 },
{ TZ+Arizona, 1000000002, "2001-09-08 18:46:42 -0700 (MST)", 0 },
{ TZ+UTC , 1000000002, "2001-09-09 01:46:42 +0000 (UTC)", 0 },
{ TZ+CentEur, 1000000002, "2001-09-09 03:46:42 +0200 (CEST)", 0 },
{ TZ+Japan , 1000000002, "2001-09-09 10:46:42 +0900 (JST)", 0 },
{ TZ+NZ , 1000000002, "2001-09-09 13:46:42 +1200 (NZST)", 0 },
+#if TZ_ANGLE_BRACKETS_SHOULD_WORK
+ { TZ+Unknown, 0, "1970-01-01 00:00:00 -0000 (-00)", 0 },
+ { TZ+Unknown, 500000001, "1985-11-05 00:53:21 -0000 (-00)", 0 },
{ TZ+Unknown, 1000000002, "2001-09-09 01:46:42 -0000 (-00)", 0 },
+#endif
{ 0 }
};