llvm-6502/lib/System/Unix
Dan Gohman 070c42f311 glibc has two versions of strerror_r, a standards compliant one and a GNU
specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always
defines _GNU_SOURCE on linux platforms because glibc's headers won't compile
in C++ mode without it. The GNU strerror_r doesn't always modify the buffer
which causes empty error messages on linux.

This patch changes MakeErrMsg to use the return value of strerror_r to get
the string instead of assuming the buffer will be modified, on GLIBC.

Patch by Benjamin Kramer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 18:05:46 +00:00
..
Alarm.inc Add a Sleep() function. 2009-02-08 22:47:39 +00:00
Host.inc Add llvm::sys::getHostTriple and remove 2009-03-31 17:30:15 +00:00
Memory.inc Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get: 2009-04-20 20:50:13 +00:00
Mutex.inc Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Path.inc add a new static method to portably determine whether a patch is 2009-06-15 04:17:07 +00:00
Process.inc Add support for outputting ANSI colors to raw_fd_ostream. 2009-06-04 07:09:50 +00:00
Program.inc Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get: 2009-04-20 20:50:13 +00:00
README.txt Fix a typo. 2004-08-26 07:43:33 +00:00
Signals.inc fix PR3965:SIGINT handler not restored after calling ParseAST(), 2009-04-12 23:33:13 +00:00
TimeValue.inc Remove attribution from file headers, per discussion on llvmdev. 2007-12-29 20:36:04 +00:00
Unix.h glibc has two versions of strerror_r, a standards compliant one and a GNU 2009-06-15 18:05:46 +00:00

llvm/lib/System/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.