From b34e03b393669e9c3d8bae8adff916cd70b08b5d Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Sat, 30 Aug 2008 18:59:58 +0000 Subject: [PATCH] Only define driveLetterExists() when we need it, as _getdrives() is not always available. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3059 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/file/dirs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sc2/src/sc2code/libs/file/dirs.c b/sc2/src/sc2code/libs/file/dirs.c index c680c8f5b..3045af452 100644 --- a/sc2/src/sc2code/libs/file/dirs.c +++ b/sc2/src/sc2code/libs/file/dirs.c @@ -641,7 +641,9 @@ err: return -1; } -#ifdef HAVE_DRIVE_LETTERS +#if defined(HAVE_DRIVE_LETTERS) && defined(HAVE_CWD_PER_DRIVE) + // This code is only needed if we have a current working directory + // per drive. // letter is 0 based: 0 = A, 1 = B, ... bool driveLetterExists(int letter) @@ -652,7 +654,7 @@ driveLetterExists(int letter) return ((drives >> letter) & 1) != 0; } -#endif /* HAVE_DRIVE_LETTERS */ +#endif /* if defined(HAVE_DRIVE_LETTERS) && defined(HAVE_CWD_PER_DRIVE) */ // helper for expandPath, expanding an absolute path // returns a pointer to the end of the filled in part of dest.