1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/contrib/mandoc/test-mkdtemp.c
Baptiste Daroussin 61d06d6bd1 Import mandoc 1.14.4
Approved by:	re (kib)
MFC after:	1 week
2018-09-20 10:58:52 +00:00

13 lines
175 B
C

#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
char dirname[] = "/tmp/temp.XXXXXX";
if (mkdtemp(dirname) != dirname)
return 1;
return rmdir(dirname) == -1;
}