diff --git a/cryptest.nmake b/cryptest.nmake index 976cd1f9..c84b3de9 100644 --- a/cryptest.nmake +++ b/cryptest.nmake @@ -246,13 +246,11 @@ cryptopp.dll cryptopp.lib cryptopp.exp: $(LIB_OBJS) cryptopp.def $(LD) $(LDFLAGS) /DLL /DEF:cryptopp.def /IGNORE:4102 $(LIB_OBJS) $(LDLIBS) /out:cryptopp.dll clean :: - $(RM) /F /Q cryptest.exe cryptlib.lib pch.pch pch.obj 2>null + $(RM) /F /Q cryptest.exe cryptest.lib cryptest.exp cryptlib.lib pch.pch 2>null clean :: $(RM) /F /Q cryptopp.dll cryptopp.lib cryptopp.exp cryptopp.def 2>null clean :: - $(RM) /F /Q $(LIB_OBJS) $(ASM_OBJS) 2>null -clean :: - $(RM) /F /Q $(TEST_OBJS) *.pdb 2>null + $(RM) /F /Q pch.obj $(LIB_OBJS) $(ASM_OBJS) $(TEST_OBJS) *.pdb 2>null distclean :: clean !IF EXIST ($(USERNAME).sdf) diff --git a/test.cpp b/test.cpp index 252fc17f..bf3b0842 100644 --- a/test.cpp +++ b/test.cpp @@ -491,15 +491,14 @@ void SetArgvPathHint(const char* argv0, std::string& pathHint) pathHint = getexecname(); #endif -#if defined(UNIX_PATH_FAMILY) -# if (_POSIX_C_SOURCE >= 200809L) || (_XOPEN_SOURCE >= 700) +#if (_POSIX_C_SOURCE >= 200809L) || (_XOPEN_SOURCE >= 700) char* resolved = realpath (pathHint.c_str(), NULLPTR); if (resolved != NULLPTR) { pathHint = resolved; std::free(resolved); } -# else +#elif defined(UNIX_PATH_FAMILY) std::string resolved(path_max, (char)0); char* r = realpath (pathHint.c_str(), &resolved[0]); if (r != NULLPTR) @@ -507,8 +506,9 @@ void SetArgvPathHint(const char* argv0, std::string& pathHint) resolved.resize(std::strlen(&resolved[0])); std::swap(pathHint, resolved); } -# endif +#endif +#if defined(UNIX_PATH_FAMILY) // Is it possible for realpath to fail? struct stat buf; int x; x = lstat(pathHint.c_str(), &buf);