aboutsummaryrefslogtreecommitdiffstats
path: root/gl/mkdtemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/mkdtemp.c')
-rw-r--r--gl/mkdtemp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gl/mkdtemp.c b/gl/mkdtemp.c
index 60bbd0aa4..c3460782a 100644
--- a/gl/mkdtemp.c
+++ b/gl/mkdtemp.c
@@ -74,9 +74,6 @@
#ifdef __MINGW32__
# include <io.h>
-/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
- Therefore we have to disable the argument count checking. */
-# define mkdir ((int (*)()) _mkdir)
#endif
#if !_LIBC
@@ -177,7 +174,11 @@ gen_tempname (char *tmpl)
v /= 62;
XXXXXX[5] = letters[v % 62];
+#ifdef MKDIR_TAKES_ONE_ARG
+ fd = mkdir (tmpl);
+#else
fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+#endif
if (fd >= 0)
{