Fixed compiling in Windows/Cygwin

This commit is contained in:
Thulinma 2018-04-05 21:16:21 +02:00
parent e39599894f
commit 5b0e2886ac

View file

@ -349,14 +349,18 @@ namespace IPC {
} }
/// Returns true if the open file still exists. /// Returns true if the open file still exists.
/// Not implemented under Windows. /// \TODO Not implemented under Windows.
bool sharedPage::exists(){ bool sharedPage::exists(){
#if defined(__CYGWIN__) || defined(_WIN32)
return true;//Not implemented under Windows...
#else
#ifdef SHM_ENABLED #ifdef SHM_ENABLED
struct stat sb; struct stat sb;
if (fstat(handle, &sb)){return false;} if (fstat(handle, &sb)){return false;}
return (sb.st_nlink > 0); return (sb.st_nlink > 0);
#else #else
return true; return true;
#endif
#endif #endif
} }