=================================================================== RCS file: /cvs/mandoc/test-strptime.c,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- mandoc/test-strptime.c 2011/07/24 18:15:14 1.1 +++ mandoc/test-strptime.c 2015/10/06 18:32:20 1.3 @@ -1,13 +1,14 @@ #if defined(__linux__) || defined(__MINT__) -# define _GNU_SOURCE /* strptime(), getsubopt() */ +# define _GNU_SOURCE /* strptime() */ #endif #include int -main(int argc, char **argv) +main(void) { struct tm tm; - strptime(*argv, "%D", &tm); - return 0; + const char input[] = "2014-01-04"; + return ! (strptime(input, "%Y-%m-%d", &tm) == input + 10 && + tm.tm_year == 114 && tm.tm_mon == 0 && tm.tm_mday == 4); }