=================================================================== RCS file: /cvs/mandoc/test-strptime.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- mandoc/test-strptime.c 2011/07/24 18:15:14 1.1 +++ mandoc/test-strptime.c 2014/01/04 01:11:00 1.2 @@ -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( ! (input+10 == strptime(input, "%Y-%m-%d", &tm) && + 114 == tm.tm_year && 0 == tm.tm_mon && 4 == tm.tm_mday)); }