From 366185c161c417998e1ecf4138ee64d43b49b0d8 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 1 Mar 1999 09:03:37 +0000 Subject: [PATCH] [project @ 1999-03-01 09:03:37 by sof] mingw32: MS C runtime implementation of mkdir() doesn't allow you to specify the access permissions to pin on a directory. --- ghc/lib/std/cbits/createDirectory.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc/lib/std/cbits/createDirectory.c b/ghc/lib/std/cbits/createDirectory.c index 370b796..389a293 100644 --- a/ghc/lib/std/cbits/createDirectory.c +++ b/ghc/lib/std/cbits/createDirectory.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: createDirectory.c,v 1.3 1998/12/02 13:27:16 simonm Exp $ + * $Id: createDirectory.c,v 1.4 1999/03/01 09:03:37 sof Exp $ * * createDirectory Runtime Support} */ @@ -17,6 +17,12 @@ #include #endif +#if defined(mingw32_TARGET_OS) +#define mkDir(nm,p) mkdir(nm) +#else +#define mkDir(nm,p) mkdir(nm,p) +#endif + StgInt createDirectory(path) StgByteArray path; @@ -24,7 +30,7 @@ StgByteArray path; int rc; struct stat sb; - while((rc = mkdir(path, 0777)) != 0) { + while((rc = mkDir(path, 0777)) != 0) { if (errno != EINTR) { cvtErrno(); switch (ghc_errno) { -- 1.7.10.4