* winsup.h (flush_file_buffers): Define as inline function.
* miscfuncs.cc (flush_file_buffers): Remove.
This commit is contained in:
parent
56c07aa2ce
commit
c5a3166fc5
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 ******************************/
|
||||
|
Loading…
Reference in New Issue
Block a user