# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1336257867 0 # Node ID b217cf9161c711f5745fe40433233e362fa004ea # Parent de49c1f284b2d73c13e549f4e92c34046646b995 Move some more platform specific code into dwcompat. diff -r de49c1f284b2 -r b217cf9161c7 dwcompat.c --- a/dwcompat.c Sat May 05 21:41:57 2012 +0000 +++ b/dwcompat.c Sat May 05 22:44:27 2012 +0000 @@ -54,7 +54,7 @@ int API makedir(char *path) { #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) - return mkdir(path); + return mkdir(path, 0); #else return mkdir(path,S_IRWXU); #endif diff -r de49c1f284b2 -r b217cf9161c7 dwcompat.h --- a/dwcompat.h Sat May 05 21:41:57 2012 +0000 +++ b/dwcompat.h Sat May 05 22:44:27 2012 +0000 @@ -206,9 +206,10 @@ # define strcasecmp(a, b) _stricmp(a, b) # define strncasecmp(a, b, c) _strnicmp(a, b, c) # define strdup(a) _strdup(a) +# define snprintf _snprintf # define unlink(a) _unlink(a) # define close(a) _close(a) -# define mkdir(a) _mkdir(a) +# define mkdir(a,b) _mkdir(a) # define fdopen(a, b) _fdopen(a, b) # define chdir(a) _chdir(a) # else @@ -383,6 +384,11 @@ #define dwstat stat #endif +#if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__) && _MSC_VER < 1400) +#undef mkdir +#define mkdir(a,b) mkdir(a) +#endif + #define socksprint(a, b) sockwrite(a, b, strlen(b), 0) char * API vargs(char *buf, int len, char *format, ...);