diff options
author | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-08-19 09:07:37 +0200 |
commit | 2d042f719910c5aa1ba9f4a47b21009c729c345e (patch) | |
tree | 2b20d89d5f1ca342ca6f1d817c18b324adf7086f /fontconfig/src/fccompat.c | |
parent | c3d3ea464f7f4e53e8fe3e11ecada36cb209ba4d (diff) | |
parent | 854ec4da20ddff9b830be0a7d5b81d8cb4774132 (diff) | |
download | vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.gz vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.tar.bz2 vcxsrv-2d042f719910c5aa1ba9f4a47b21009c729c345e.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig libX11 libXdmcp libxcb xkeyboard-config mesa pixman xserver git update 19 aug 2013
Conflicts:
fontconfig/src/fccache.c
Diffstat (limited to 'fontconfig/src/fccompat.c')
-rw-r--r-- | fontconfig/src/fccompat.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fontconfig/src/fccompat.c b/fontconfig/src/fccompat.c index a2171607c..d4f88c83f 100644 --- a/fontconfig/src/fccompat.c +++ b/fontconfig/src/fccompat.c @@ -219,3 +219,30 @@ FcRandom(void) return result; } + +#ifdef _WIN32 +#include <direct.h> +#define mkdir(path,mode) _mkdir(path) +#endif + +FcBool +FcMakeDirectory (const FcChar8 *dir) +{ + FcChar8 *parent; + FcBool ret; + + if (strlen ((char *) dir) == 0) + return FcFalse; + + parent = FcStrDirname (dir); + if (!parent) + return FcFalse; + if (access ((char *) parent, F_OK) == 0) + ret = mkdir ((char *) dir, 0755) == 0 && chmod ((char *) dir, 0755) == 0; + else if (access ((char *) parent, F_OK) == -1) + ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0755) == 0) && chmod ((char *) dir, 0755) == 0; + else + ret = FcFalse; + FcStrFree (parent); + return ret; +} |