summaryrefslogtreecommitdiffstats
path: root/gl
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-06-26 15:48:44 +0200
committerWerner Koch <wk@gnupg.org>2007-06-26 15:48:44 +0200
commita7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16 (patch)
tree56d859ed11c7dc6faec9df7d6c55fbdf3b334b87 /gl
parentFixed a problem in estream-printf.c. (diff)
downloadgnupg2-a7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16.tar.xz
gnupg2-a7fe86bc02f5b33cfc3c48a4d2e15d3ff94ffa16.zip
More W32 related changes
Diffstat (limited to 'gl')
-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)
{