From: Jelmer Vernooij Date: Mon, 20 Apr 2009 13:39:48 +0000 (+0200) Subject: Cope with the fact that only _mkdir() exists on Windows and that it X-Git-Tag: tdb-1.1.5~958^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5233ccf9e32cd5d399f91512d7f310d43558e31;p=thirdparty%2Fsamba.git Cope with the fact that only _mkdir() exists on Windows and that it doesn't take a mode argument. --- diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 78c688d50c7..a648391b23d 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -31,6 +31,10 @@ #include "system/locale.h" #include "system/wait.h" +#ifdef _WIN32 +#define mkdir(d,m) _mkdir(d) +#endif + void replace_dummy(void); void replace_dummy(void) {} diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h index 4bf1f648650..1cf6f231b7b 100644 --- a/lib/replace/system/filesys.h +++ b/lib/replace/system/filesys.h @@ -179,4 +179,8 @@ #define SEEK_SET 0 #endif +#ifdef _WIN32 +#define mkdir(d,m) _mkdir(d) +#endif + #endif diff --git a/lib/replace/test/os2_delete.c b/lib/replace/test/os2_delete.c index 44efeea08a5..8b52837018d 100644 --- a/lib/replace/test/os2_delete.c +++ b/lib/replace/test/os2_delete.c @@ -27,6 +27,10 @@ static int test_readdir_os2_delete_ret; #define MIN(a,b) ((a)<(b)?(a):(b)) #endif +#ifdef _WIN32 +#define mkdir(d,m) _mkdir(d) +#endif + static void cleanup(void) { /* I'm a lazy bastard */