Don't warn about deprecation on Win32. Code written for GLib 1.2 doesn't
[platform/upstream/glib.git] / gfileutils.c
index ce80242..eb545dc 100644 (file)
@@ -27,6 +27,7 @@
 #include <unistd.h>
 #endif
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/types.h>
@@ -624,7 +625,11 @@ g_file_open_tmp (const char *tmpl,
   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,