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 * const char *
GetFilePathname (); GetFilePathname ();
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void void
SetLineBuffered(); SetLineBuffered();
#endif // #if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
protected: protected:
//------------------------------------------------------------------ //------------------------------------------------------------------

View File

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