X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=cbits%2FdirUtils.c;h=fdcdf295d3d3fe921081ceb0b466bc0f9a699a39;hb=e9e2a5412bb7cda8d13a063ac403d9f18ac97380;hp=f256463137412ddfac9748b65f1f873fe5a42dd2;hpb=67bb055da8e135865c305062390c0b5da7262402;p=ghc-base.git diff --git a/cbits/dirUtils.c b/cbits/dirUtils.c index f256463..fdcdf29 100644 --- a/cbits/dirUtils.c +++ b/cbits/dirUtils.c @@ -4,17 +4,17 @@ * Directory Runtime Support */ -#include "config.h" +#include "ghcconfig.h" // The following is required on Solaris to force the POSIX versions of // the various _r functions instead of the Solaris versions. -#ifdef solaris2_TARGET_OS +#ifdef solaris2_HOST_OS #define _POSIX_PTHREAD_SEMANTICS #endif #include "HsBase.h" -#if defined(mingw32_TARGET_OS) || defined(__MINGW32__) || defined(_MSC_VER) +#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER) #include static @@ -63,7 +63,7 @@ __hscore_readdir( HsAddr dirPtr, HsAddr pDirEnt ) #if HAVE_READDIR_R struct dirent* p; int res; - static unsigned int nm_max = -1; + static unsigned int nm_max = (unsigned int)-1; if (pDirE == NULL) { return -1; @@ -117,7 +117,7 @@ HsInt __hscore_renameFile( HsAddr src, HsAddr dest) { -#if (defined(_MSC_VER) || defined(_WIN32)) +#if defined(mingw32_HOST_OS) || defined(__MINGW32__) || defined(_MSC_VER) static int forNT = -1; /* ToDo: propagate error codes back */