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

File: [cvsweb.bsd.lv] / mandoc / test-mkdtemp.c (download)

Revision 1.1, Thu Mar 19 14:57:29 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN

Compat glue needed for Solaris 9 and 10.

Thanks to Sevan Janiyan <venture37 at geeklan dot co dot uk> for
reporting the Solaris 10 issues, to Jan Holzhueter <jh at opencsw
dot org> for some additional insight, and to OpenCSW in general for
providing me with a Solaris 9/10/11 testing environment.

#include <stdlib.h>
#include <unistd.h>

int
main(void)
{
	char	dirname[] = "/tmp/temp.XXXXXX";

	if (mkdtemp(dirname) != dirname)
		return(1);
	return(rmdir(dirname) == -1);
}