diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 8d39baa3bb741e6799d25dcc36cad7c628aa9be8..6d762faaf22cb959630175d8b04cad3666c54b51 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -7,6 +7,7 @@ #include <stdio.h> #include <string.h> #include <time.h> +#include <sys/stat.h> #include "GmshConfig.h" #include "GmshMessage.h" #include "GmshSocket.h" @@ -16,10 +17,6 @@ #include "Context.h" #include "OS.h" -#if !defined(WIN32) || defined(__CYGWIN__) -#include <sys/stat.h> -#endif - #if defined(HAVE_ONELAB) #include "onelab.h" #endif @@ -161,13 +158,11 @@ void Msg::Exit(int level) static int streamIsFile(FILE* stream) { -#if !defined(WIN32) || defined(__CYGWIN__) // the given stream is definately not interactive if it is a regular file struct stat stream_stat; if(fstat(fileno(stream), &stream_stat) == 0){ if(stream_stat.st_mode & S_IFREG) return 1; } -#endif return 0; }