diff options
author | emaste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-11-25 21:00:58 +0000 |
commit | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (patch) | |
tree | c94307da318be46e5aeea1a325c1e91749506e4f /tools/driver/Platform.cpp | |
parent | 788502c6f6261e2d84ef85d1052b41a6c5be31b3 (diff) | |
download | FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.zip FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.tar.gz |
Import LLDB as of upstream SVN r216948 (git 50f7fe44)
This corresponds with the branchpoint for the 3.5 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'tools/driver/Platform.cpp')
-rw-r--r-- | tools/driver/Platform.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/driver/Platform.cpp b/tools/driver/Platform.cpp index 5b5286e..a491615 100644 --- a/tools/driver/Platform.cpp +++ b/tools/driver/Platform.cpp @@ -8,17 +8,14 @@ //===----------------------------------------------------------------------===// // this file is only relevant for Visual C++ -#if defined( _MSC_VER ) +#if defined( _WIN32 ) #include <process.h> #include <assert.h> +#include <stdlib.h> #include "Platform.h" -// index one of the variable arguments -// presuming "(EditLine *el, ..." is first in the argument list -#define GETARG( Y, X ) ( (void* ) *( ( (int**) &(Y) ) + (X) ) ) - // the control handler or SIGINT handler static sighandler_t _ctrlHandler = NULL; @@ -42,14 +39,16 @@ ioctl (int d, int request, ...) // request the console windows size case ( TIOCGWINSZ ): { - // locate the window size structure on stack - winsize *ws = (winsize*) GETARG( d, 2 ); + va_list vl; + va_start(vl,request); + // locate the window size structure on stack + winsize *ws = va_arg(vl, winsize*); // get screen buffer information CONSOLE_SCREEN_BUFFER_INFO info; - GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &info ); - // fill in the columns - ws->ws_col = info.dwMaximumWindowSize.X; - // + if ( GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &info ) == TRUE ) + // fill in the columns + ws->ws_col = info.dwMaximumWindowSize.X; + va_end(vl); return 0; } break; @@ -85,6 +84,7 @@ tcgetattr (int fildes, struct termios *termios_p) return -1; } +#ifdef _MSC_VER sighandler_t signal (int sig, sighandler_t sigFunc) { @@ -107,5 +107,6 @@ signal (int sig, sighandler_t sigFunc) } return 0; } +#endif -#endif
\ No newline at end of file +#endif |