1 // commit: 69ecbd0f3188be97f91cc0d6415836d23e88f7fc 2011-02-19
2 // commit: 382584724308442f03f3d29f7fc6de9e9d140982 2011-06-12
3 // commit: c4685ae429a0cce4b285859d62a71fe603f0a864 2013-08-02
4 // mkdtemp should return -1 on bad template
5 #define _DEFAULT_SOURCE 1
12 char *mkdtemp(char *);
14 #define S "/dev/null/fooXXXX"
23 t_error("mkdtemp(" S
") did not fail\n");
24 if (memcmp(p
, S
, sizeof p
) != 0)
25 t_error("mkdtemp(" S
") modified the template: %s\n", p
);
26 if (r
== 0 && errno
!= EINVAL
)
27 t_error("mkdtemp(" S
") failed with %d [%s] instead of %d [%s]\n",
28 errno
, strerror(errno
), EINVAL
, strerror(EINVAL
));