Skip to content
Snippets Groups Projects
Commit a6e182d1 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

win32

parent 14dce871
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment