Commit Graph

6 Commits

Author SHA1 Message Date
Zachary Turner 29365da0e8 Delete the custom implementation of signal() on Windows.
The Windows SDK provides a version of signal() that is much more
limited compared to other platforms.  It only supports about 5-6
signal values.  LLDB uses signals for a number of things, most
notably to handle Ctrl+C so we can gracefully shut down.  The
portability solution to this on Windows has been to provide a
hand-rolled implementation of `signal` using the name `signal`
so that you could write code that simply calls signal directly
and it would work.

But this introduces a multiply defined symbol with the builtin
version and depending on how you included header files, you could
get yourself into a situation where you had linker errors.  To
make matters worse, it led to a ton of compiler warnings.  Worst
of all though is that this custom implementation of signal was,
in fact, identical for the purposes of handling Ctrl+C as the
builtin implementation of signal.  So it seems to have literally
not been serving any useful purpose.

This patch deletes all the custom signal() functions for Windows,
and includes the signal.h system header, so that any calls to
signal now go to the actual version provided by the Windows SDK.

Differential Revision: http://reviews.llvm.org/D18287

llvm-svn: 263858
2016-03-18 23:47:48 +00:00
Hafiz Abid Qadeer d8265d3071 Hide some declarations from mingw.
llvm-svn: 203781
2014-03-13 10:42:28 +00:00
Hafiz Abid Qadeer 6eff101926 Replace some _MSC_VER with _WIN32.
This allows to use some code for mingw which was previously only
used for MSVC.

llvm-svn: 203651
2014-03-12 10:45:23 +00:00
Hafiz Abid Qadeer bdb515916c Added some missing header files.
They help fix mingw build.

llvm-svn: 203650
2014-03-12 10:39:46 +00:00
Deepak Panickal 99fbc07600 Fix Windows build using portable types for formatting the log outputs
llvm-svn: 202723
2014-03-03 15:39:47 +00:00
Deepak Panickal 429222c1f6 Patch enabling lldb command line driver to run on windows.
CHANGES:
- Thread locking switched from pthreads to C++11 standard library.
- Abstracted platform specific header includes into 'platform.h'.
- Create editline emulator for windows.
- Emulated various platform dependant functions on windows.
TODO:
- User input currently handled by gets_s(), work started on better handler:
    see _WIP_INPUT_METHOD define blocks in 'ELWrapper.cpp'.
    Aim is to handle 'tab' auto completion on windows.
- Tidy up 'getopt.inc' from lldbHostCommon to serve as LLDB Drivers getopt windows implementation.

llvm-svn: 192714
2013-10-15 15:46:40 +00:00