mktime regression test from Andy Shevchenko
This commit is contained in:
parent
40d362f8e0
commit
70e554789a
@ -1,5 +1,5 @@
|
||||
# $NetBSD: Makefile,v 1.1 1998/01/21 05:46:30 mycroft Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2008/08/27 08:50:04 christos Exp $
|
||||
|
||||
SUBDIR+=strptime
|
||||
SUBDIR+=mktime strptime
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
10
regress/lib/libc/time/mktime/Makefile
Normal file
10
regress/lib/libc/time/mktime/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.1 2008/08/27 08:50:04 christos Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
PROG= mktime
|
||||
|
||||
regress:
|
||||
./${PROG}
|
||||
|
||||
.include <bsd.prog.mk>
|
22
regress/lib/libc/time/mktime/mktime.c
Normal file
22
regress/lib/libc/time/mktime/mktime.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
time_t rc;
|
||||
struct tm tms;
|
||||
|
||||
(void)memset(&tms, 0, sizeof(tms));
|
||||
tms.tm_year = ~0;
|
||||
|
||||
errno = 0;
|
||||
rc = mktime(&tms);
|
||||
|
||||
if (errno != 0)
|
||||
errx(1, "mktime(): errno was %d", errno);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user