llvm-6502/lib/Support/Unix
Chandler Carruth f7364d5833 Add support for linking against a curses library when available and
using it to detect whether or not a terminal supports colors. This
replaces a particularly egregious hack that merely compared the TERM
environment variable to "dumb". That doesn't really translate to
a reasonable experience for users that have actually ensured their
terminal's capabilities are accurately reflected.

This makes testing a terminal for color support somewhat more expensive,
but it is called very rarely anyways. The important fast path when the
output is being piped somewhere is already in place.

The global lock may seem excessive, but the spec for calling into curses
is *terrible*. The whole library is terrible, and I spent quite a bit of
time looking for a better way of doing this before convincing myself
that this was the fundamentally correct way to behave. The damage of the
curses library is very narrowly confined, and we continue to use raw
escape codes for actually manipulating the colors which is a much sane
system than directly using curses here (IMO).

If this causes trouble for folks, please let me know. I've tested it on
Linux and will watch the bots carefully. I've also worked to account for
the variances of curses interfaces that I could finde documentation for,
but that may not have been sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 08:47:36 +00:00
..
Host.inc revert r147542 after comments from Joerg Sonnenberger 2012-01-05 18:28:46 +00:00
Memory.inc Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc." 2013-07-26 22:13:57 +00:00
Mutex.inc
Path.inc Make file_status::getUniqueID const. 2013-07-29 21:55:38 +00:00
Process.inc Add support for linking against a curses library when available and 2013-08-07 08:47:36 +00:00
Program.inc Add missing 'n'. 2013-07-26 20:44:45 +00:00
README.txt
RWMutex.inc
Signals.inc Revert part of 186302 to fix buildbots. 2013-07-15 04:37:54 +00:00
system_error.inc
ThreadLocal.inc
TimeValue.inc Fix a FIXME about the format and add a test. 2013-07-11 15:35:23 +00:00
Unix.h Remove dead or useless header checks from cmake and autoconf 2013-07-26 16:54:23 +00:00
Watchdog.inc Add a new watchdog timer interface. The interface does not permit handling timeouts, so 2013-03-26 01:27:52 +00:00

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.