Fixup on setlinebuf() patch to make it work.

llvm-svn: 124944
This commit is contained in:
Greg Clayton 2011-02-05 06:41:57 +00:00
parent edd5192d13
commit 068d16b4df
2 changed files with 3 additions and 6 deletions

View File

@ -62,10 +62,8 @@ public:
const char *
GetFilePathname ();
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void
SetLineBuffered();
#endif // #if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
protected:
//------------------------------------------------------------------

View File

@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/Core/StreamFile.h"
#include "lldb/Host/Config.h"
#include <stdio.h>
// C Includes
@ -94,16 +95,14 @@ StreamFile::Open (const char *path, const char *permissions)
return m_file != NULL;
}
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void
StreamFile::SetLineBuffered ()
{
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
if (m_file != NULL)
setlinebuf (m_file);
}
#endif // #if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
}
void
StreamFile::Flush ()