diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-12 12:57:39 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-02-12 12:57:39 +0000 |
commit | 1b35617212ff97f97967393995abd4b77d0b0714 (patch) | |
tree | e5c0fedbe5e236f592a02855bad9d6dbc03b5d09 /Build/source/texk/kpathsea/dir.c | |
parent | 48ccab09c4fc16fea0324771bbdfd3212aebabb2 (diff) |
fix compilation with -DNO_DEBUG
git-svn-id: svn://tug.org/texlive/trunk@16986 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/dir.c')
-rw-r--r-- | Build/source/texk/kpathsea/dir.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Build/source/texk/kpathsea/dir.c b/Build/source/texk/kpathsea/dir.c index 5f599c15260..295e4dcb75c 100644 --- a/Build/source/texk/kpathsea/dir.c +++ b/Build/source/texk/kpathsea/dir.c @@ -1,6 +1,6 @@ /* dir.c: directory operations. - Copyright 1992, 1993, 1994, 1995, 2008, 2009 Karl Berry. + Copyright 1992, 1993, 1994, 1995, 2008, 2009, 2010 Karl Berry. Copyright 2000, 2002, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -36,9 +36,10 @@ kpathsea_dir_p (kpathsea kpse, const_string fn) #ifdef WIN32 int fa; - kpse_normalize_path((string)fn); + kpathsea_normalize_path(kpse, (string)fn); fa = GetFileAttributes(fn); +#ifdef KPSE_DEBUG if (KPATHSEA_DEBUG_P (KPSE_DEBUG_STAT)) { if (fa == 0xFFFFFFFF) { fprintf(stderr, "failed to get file attributes for %s (%d)\n", @@ -49,18 +50,19 @@ kpathsea_dir_p (kpathsea kpse, const_string fn) "is" : "is not"); } } +#endif /* KPSE_DEBUG */ return (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY)); -#else +#else /* !WIN32 */ struct stat stats; return stat (fn, &stats) == 0 && S_ISDIR (stats.st_mode); -#endif +#endif /* !WIN32 */ } #if defined(KPSE_COMPAT_API) boolean dir_p (const_string fn) { - return kpathsea_dir_p(kpse_def,fn); + return kpathsea_dir_p(kpse_def, fn); } #endif |