Commit 366185c1 authored by sof's avatar sof
Browse files

[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.
parent b55bcd0f
/*
* (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 <sys/stat.h>
#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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment