diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-12-20 20:34:28 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-12-20 20:34:28 +0000 |
commit | c5a3166fc542ce515e83befe6be9e62d9e2c6102 (patch) | |
tree | d5f847047f1b5d8595364d1c964738d2dd49378e | |
parent | 56c07aa2ce1cde43eda6928fdad1e19140efc8be (diff) | |
download | cygnal-c5a3166fc542ce515e83befe6be9e62d9e2c6102.tar.gz cygnal-c5a3166fc542ce515e83befe6be9e62d9e2c6102.tar.bz2 cygnal-c5a3166fc542ce515e83befe6be9e62d9e2c6102.zip |
* winsup.h (flush_file_buffers): Define as inline function.
* miscfuncs.cc (flush_file_buffers): Remove.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 11 | ||||
-rw-r--r-- | winsup/cygwin/winsup.h | 5 |
3 files changed, 9 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f8217be34..aa6cd5a65 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2005-12-20 Corinna Vinschen <corinna@vinschen.de> + * winsup.h (flush_file_buffers): Define as inline function. + * miscfuncs.cc (flush_file_buffers): Remove. + +2005-12-20 Corinna Vinschen <corinna@vinschen.de> + * winsup.h (flush_file_buffers): Declare new function. (FLushFileBuffers): New define. * miscfuncs.cc (flush_file_buffers): Define new function. diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 474843a19..26686bd2b 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -361,14 +361,3 @@ create_pipe (PHANDLE hr,PHANDLE hw, LPSECURITY_ATTRIBUTES sa, DWORD n) break; return false; } - -#undef FlushFileBuffers -bool -flush_file_buffers (HANDLE h) -{ - DWORD ftype = GetFileType (h); - /* Per MSDN, FlushFileBuffers on named pipes might block. This is the last - we want it to do, especially when printing debug output as when calling - system_printf. */ - return (ftype != FILE_TYPE_PIPE) ? FlushFileBuffers (h) : true; -} 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 ******************************/ |