1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Jeffrey Yasskin
29ea777c1e Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Dan Gohman
d0637707c5 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!

llvm-svn: 73396
2009-06-15 18:05:46 +00:00
Daniel Dunbar
024320d274 Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:
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/": ").

llvm-svn: 69626
2009-04-20 20:50:13 +00:00
Dan Gohman
bab18cae46 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Reid Spencer
9b5ea0704e For PR797:
Make the Win32 code exception free (untested/uncompiled) which forced some
interface changes which had ripple effect. This should be the last of 797.

llvm-svn: 29884
2006-08-25 21:37:17 +00:00
Reid Spencer
71c3f66dc6 For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.

llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Reid Spencer
bc4c8e8ac0 For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.

llvm-svn: 29843
2006-08-23 07:30:48 +00:00
Reid Spencer
e9f818b95a For PR797:
Remove all exception code from Program.inc and implement its new interface
with an ErrMsg string argument.

llvm-svn: 29790
2006-08-21 06:02:44 +00:00
Chris Lattner
8116948fa5 Change AllocateRWX/DeallocateRWX to not throw an exception.
llvm-svn: 29058
2006-07-07 17:32:37 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Reid Spencer
c3b52b74cd For Bug 543:
Allow the ThrowErrno function to optionally accept an error number
parameter so that callers can specify the error number to be used.

llvm-svn: 21384
2005-04-21 02:30:32 +00:00
Chris Lattner
51c55602c9 Fix a bug in my previous change to this, which broke the build on sparcs.
llvm-svn: 20184
2005-02-14 21:42:10 +00:00
Chris Lattner
535796ff26 If errno is zero strerror_r does not modify the buffer, leaving it unterminated.
This causes garbage to be printed out after error messages.

llvm-svn: 20165
2005-02-13 22:46:37 +00:00
Reid Spencer
1c90f8199e For PR351:
* 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.

llvm-svn: 19161
2004-12-27 06:17:50 +00:00
Chris Lattner
aa0eee9e3e Make this work with the ICC compiler, contributed by Bjørn Wennberg
llvm-svn: 18626
2004-12-08 16:10:52 +00:00
Reid Spencer
542b5216bf Forget strerror_r, it causes problems. Fix later when threading matters
llvm-svn: 17783
2004-11-14 22:10:54 +00:00
Reid Spencer
bba26329ab Adjust sys/stat.h inclusion so its only for SunOS.
llvm-svn: 16686
2004-10-05 00:56:46 +00:00
Tanya Lattner
7198953962 Added a couple of includes to get this to compile on Sparc.
llvm-svn: 16685
2004-10-05 00:51:26 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
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/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
31513069db Add a new abstraction, SysConfig for platform independent system
configuration calls. Right now this just contains PreventCoreFiles so that
bugpoint can by platform independent.

llvm-svn: 16124
2004-08-31 17:43:29 +00:00
Reid Spencer
bb50ba0d5a Add inclusion of assert.h
llvm-svn: 16118
2004-08-30 16:03:54 +00:00
Reid Spencer
fd00fa3ad8 Include some additional header files.
Fix the banner length.

llvm-svn: 16086
2004-08-29 19:24:20 +00:00
Reid Spencer
a50f1b794a Initial implementation of the Path operating system concept.
llvm-svn: 16048
2004-08-25 06:20:07 +00:00