[BACK]Return to test-strptime.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/test-strptime.c, Revision 1.2

1.1       kristaps    1: #if defined(__linux__) || defined(__MINT__)
1.2     ! schwarze    2: # define _GNU_SOURCE /* strptime() */
1.1       kristaps    3: #endif
                      4:
                      5: #include <time.h>
                      6:
                      7: int
1.2     ! schwarze    8: main(void)
1.1       kristaps    9: {
                     10:        struct tm tm;
1.2     ! schwarze   11:        const char input[] = "2014-01-04";
        !            12:        return( ! (input+10 == strptime(input, "%Y-%m-%d", &tm) &&
        !            13:            114 == tm.tm_year && 0 == tm.tm_mon && 4 == tm.tm_mday));
1.1       kristaps   14: }

CVSweb