diff options
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r-- | winsup/cygwin/winsup.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 080bb03c9..3a24d8d1a 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -309,7 +309,10 @@ DWORD nice_to_winprio (int &) __attribute__ ((regparm (1))); bool __stdcall create_pipe (PHANDLE hr, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD) __attribute__ ((regparm (3))); #define CreatePipe create_pipe -bool __stdcall flush_file_buffers (HANDLE h) __attribute__ ((regparm (1))); +inline bool flush_file_buffers (HANDLE h) +{ + return (GetFileType (h) != FILE_TYPE_PIPE) ? FlushFileBuffers (h) : true; +} #define FlushFileBuffers flush_file_buffers /**************************** Exports ******************************/ |