diff options
author | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-12 18:20:04 +0000 |
commit | da8fe31a7ba4acf109097d5696ad0145b991cdfd (patch) | |
tree | 1c74d6f075702a73e557872f2a6f020ea4eb5432 /libXfont/src/fontfile/catalogue.c | |
parent | 6590f805a12779909cb8504c230fa367148fe38c (diff) | |
parent | 529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff) | |
download | vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2 vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip |
Changes for VC compilation
Diffstat (limited to 'libXfont/src/fontfile/catalogue.c')
-rw-r--r-- | libXfont/src/fontfile/catalogue.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c index d49423617..651ebc1a0 100644 --- a/libXfont/src/fontfile/catalogue.c +++ b/libXfont/src/fontfile/catalogue.c @@ -30,8 +30,12 @@ #include <X11/fonts/fntfilst.h> #include <sys/types.h> #include <sys/stat.h> +#ifdef _MSC_VER +#include <direct.h> +#else #include <dirent.h> #include <unistd.h> +#endif static const char CataloguePrefix[] = "catalogue:"; @@ -135,19 +139,24 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) FontPathElementPtr subfpe; struct stat statbuf; const char *path; +#ifndef _MSC_VER DIR *dir; struct dirent *entry; +#endif int len; int pathlen; path = fpe->name + strlen(CataloguePrefix); - if (stat(path, &statbuf) < 0 || !S_ISDIR(statbuf.st_mode)) + if (stat(path, &statbuf) < 0 || (statbuf.st_mode&_S_IFDIR)) return BadFontPath; if ((forceScan == FALSE) && (statbuf.st_mtime <= cat->mtime)) return Successful; - dir = opendir(path); +#ifdef _MSC_VER +__asm int 3; +#else + dir = opendir(path); if (dir == NULL) { xfree(cat); @@ -221,7 +230,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) } closedir(dir); - +#endif qsort(cat->fpeList, cat->fpeCount, sizeof cat->fpeList[0], ComparePriority); |