diff options
Diffstat (limited to 'libXfont/src/fontfile/catalogue.c')
-rwxr-xr-x[-rw-r--r--] | libXfont/src/fontfile/catalogue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c index 09ca2ae8a..75eb4e3a3 100644..100755 --- a/libXfont/src/fontfile/catalogue.c +++ b/libXfont/src/fontfile/catalogue.c @@ -27,6 +27,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include <X11/Xwindows.h> #ifdef HAVE_READLINK #include <X11/fonts/fntfilst.h> @@ -142,7 +143,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) 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)) @@ -156,6 +157,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) } CatalogueUnrefFPEs (fpe); + #ifndef _MSC_VER while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); @@ -220,6 +222,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) continue; } } + #endif closedir(dir); |