Fix getProcessPath() on Cygwin

v0.27.3
clanmills 7 years ago committed by Luis Díaz Más
parent 2f70ae4305
commit c5cd09bebe

@ -463,7 +463,7 @@ namespace Exiv2 {
std::string getProcessPath()
{
std::string ret("unknown");
#if defined(WIN32) || defined (__CYGWIN__) || defined(__MINGW__)
#if defined(WIN32)
HANDLE processHandle = NULL;
processHandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, GetCurrentProcessId());
if (processHandle != NULL) {
@ -479,7 +479,7 @@ namespace Exiv2 {
if (proc_pidpath (pid, pathbuf, sizeof(pathbuf)) > 0) {
ret = pathbuf;
}
#elif defined(__linux__)
#elif defined(__linux__) || defined(__CYGWIN__) || defined(__MINGW__)
// http://stackoverflow.com/questions/606041/how-do-i-get-the-path-of-a-process-in-unix-linux
char proc[100];
char path[500];

Loading…
Cancel
Save