summaryrefslogtreecommitdiff
path: root/lib/System/Unix/Unix.h
Commit message (Collapse)AuthorAge
* Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes theJeffrey Yasskin2009-07-01
| | | | | | | | | Windows variant, strerror_s, but I couldn't test that. I'll update configure and config.h.in in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8
* glibc has two versions of strerror_r, a standards compliant one and a GNUDan Gohman2009-06-15
| | | | | | | | | | | | | | | 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
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-20
| | | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69626 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-13
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR797:Reid Spencer2006-08-25
| | | | | | | | Make the Win32 code exception free (untested/uncompiled) which forced some interface changes which had ripple effect. This should be the last of 797. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29884 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR797:Reid Spencer2006-08-23
| | | | | | | | Final removal of exceptions from lib/System and adjustment of users to accommodate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR797:Reid Spencer2006-08-23
| | | | | | | | Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR797:Reid Spencer2006-08-21
| | | | | | | | Remove all exception code from Program.inc and implement its new interface with an ErrMsg string argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29790 91177308-0d34-0410-b5e6-96231b3b80d8
* Change AllocateRWX/DeallocateRWX to not throw an exception.Chris Lattner2006-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29058 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* For Bug 543:Reid Spencer2005-04-21
| | | | | | | | Allow the ThrowErrno function to optionally accept an error number parameter so that callers can specify the error number to be used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21384 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in my previous change to this, which broke the build on sparcs.Chris Lattner2005-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20184 91177308-0d34-0410-b5e6-96231b3b80d8
* If errno is zero strerror_r does not modify the buffer, leaving it unterminated.Chris Lattner2005-02-13
| | | | | | | This causes garbage to be printed out after error messages. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20165 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-27
| | | | | | | | | | | * Ensure #includes are wrapped with appropriate HAVE_ guards * Account for variations in time.h and sys/time.h inclusion. * Add macros for getting wait(2) exit status correctly (per autoconf sugg.) * Implement ThrowErrno in terms of strerror_r, strerror or none based on what is available on the platform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19161 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this work with the ICC compiler, contributed by Bjørn WennbergChris Lattner2004-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18626 91177308-0d34-0410-b5e6-96231b3b80d8
* Forget strerror_r, it causes problems. Fix later when threading mattersReid Spencer2004-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17783 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust sys/stat.h inclusion so its only for SunOS.Reid Spencer2004-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16686 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a couple of includes to get this to compile on Sparc.Tanya Lattner2004-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16685 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new abstraction, SysConfig for platform independent systemReid Spencer2004-08-31
| | | | | | | | configuration calls. Right now this just contains PreventCoreFiles so that bugpoint can by platform independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add inclusion of assert.hReid Spencer2004-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16118 91177308-0d34-0410-b5e6-96231b3b80d8
* Include some additional header files.Reid Spencer2004-08-29
| | | | | | | Fix the banner length. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16086 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial implementation of the Path operating system concept.Reid Spencer2004-08-25
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16048 91177308-0d34-0410-b5e6-96231b3b80d8