Configuration support for setlinebuf support from Kirk Beitz.

llvm-svn: 124943
This commit is contained in:
Greg Clayton 2011-02-05 06:37:53 +00:00
parent 8442fba3b4
commit edd5192d13
5 changed files with 13 additions and 2 deletions

View File

@ -61,9 +61,11 @@ public:
const char *
GetFilePathname ();
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void
SetLineBuffered();
#endif // #if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
protected:
//------------------------------------------------------------------

View File

@ -17,6 +17,8 @@
#ifndef liblldb_Platform_Config_h_
#define liblldb_Platform_Config_h_
#define LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED 1
#define LLDB_CONFIG_TERMIOS_SUPPORTED 1
#define LLDB_CONFIG_TILDE_RESOLVES_TO_USER 1

View File

@ -17,9 +17,10 @@
#ifndef liblldb_Platform_Config_h_
#define liblldb_Platform_Config_h_
#define LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED 1
#define LLDB_CONFIG_TERMIOS_SUPPORTED 1
#define LLDB_CONFIG_TILDE_RESOLVES_TO_USER 1
1
#endif // #ifndef liblldb_Platform_Config_h_

View File

@ -17,6 +17,8 @@
#ifndef liblldb_Platform_Config_h_
#define liblldb_Platform_Config_h_
#define LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED 1
#define LLDB_CONFIG_TERMIOS_SUPPORTED 0
#define LLDB_CONFIG_TILDE_RESOLVES_TO_USER 0

View File

@ -94,6 +94,8 @@ StreamFile::Open (const char *path, const char *permissions)
return m_file != NULL;
}
#if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void
StreamFile::SetLineBuffered ()
{
@ -101,6 +103,8 @@ StreamFile::SetLineBuffered ()
setlinebuf (m_file);
}
#endif // #if LLDB_CONFIG_SUPPORTS_SETLINEBUFFERED
void
StreamFile::Flush ()
{