Update distclean rule in cryptest.nmake

pull/778/head
Jeffrey Walton 2019-01-09 01:04:59 -05:00
parent 7428fa82ab
commit dbec62cdb2
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 6 additions and 8 deletions

View File

@ -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 $(LD) $(LDFLAGS) /DLL /DEF:cryptopp.def /IGNORE:4102 $(LIB_OBJS) $(LDLIBS) /out:cryptopp.dll
clean :: 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 :: clean ::
$(RM) /F /Q cryptopp.dll cryptopp.lib cryptopp.exp cryptopp.def 2>null $(RM) /F /Q cryptopp.dll cryptopp.lib cryptopp.exp cryptopp.def 2>null
clean :: clean ::
$(RM) /F /Q $(LIB_OBJS) $(ASM_OBJS) 2>null $(RM) /F /Q pch.obj $(LIB_OBJS) $(ASM_OBJS) $(TEST_OBJS) *.pdb 2>null
clean ::
$(RM) /F /Q $(TEST_OBJS) *.pdb 2>null
distclean :: clean distclean :: clean
!IF EXIST ($(USERNAME).sdf) !IF EXIST ($(USERNAME).sdf)

View File

@ -491,15 +491,14 @@ void SetArgvPathHint(const char* argv0, std::string& pathHint)
pathHint = getexecname(); pathHint = getexecname();
#endif #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); char* resolved = realpath (pathHint.c_str(), NULLPTR);
if (resolved != NULLPTR) if (resolved != NULLPTR)
{ {
pathHint = resolved; pathHint = resolved;
std::free(resolved); std::free(resolved);
} }
# else #elif defined(UNIX_PATH_FAMILY)
std::string resolved(path_max, (char)0); std::string resolved(path_max, (char)0);
char* r = realpath (pathHint.c_str(), &resolved[0]); char* r = realpath (pathHint.c_str(), &resolved[0]);
if (r != NULLPTR) if (r != NULLPTR)
@ -507,8 +506,9 @@ void SetArgvPathHint(const char* argv0, std::string& pathHint)
resolved.resize(std::strlen(&resolved[0])); resolved.resize(std::strlen(&resolved[0]));
std::swap(pathHint, resolved); std::swap(pathHint, resolved);
} }
# endif #endif
#if defined(UNIX_PATH_FAMILY)
// Is it possible for realpath to fail? // Is it possible for realpath to fail?
struct stat buf; int x; struct stat buf; int x;
x = lstat(pathHint.c_str(), &buf); x = lstat(pathHint.c_str(), &buf);