#include <unistd.h>
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
if (tmpl == NULL)
tmpl = ".XXXXXX";
- if (strchr (tmpl, G_DIR_SEPARATOR))
+ if (strchr (tmpl, G_DIR_SEPARATOR)
+#ifdef G_OS_WIN32
+ || strchr (tmpl, '/')
+#endif
+ )
{
g_set_error (error,
G_FILE_ERROR,