diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-09-15 14:52:46 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-09-15 14:52:46 +0000 |
commit | 2515e5a7a08bdb033e3fe6370774cf7359b9811e (patch) | |
tree | 0048e16af72d2eef9bf9f9e8ac0d78574ea4bf40 /libgfortran/runtime | |
parent | 7c4d947f29a565331ef92c4f0a15624b4821269a (diff) | |
download | gcc-2515e5a7a08bdb033e3fe6370774cf7359b9811e.zip gcc-2515e5a7a08bdb033e3fe6370774cf7359b9811e.tar.gz gcc-2515e5a7a08bdb033e3fe6370774cf7359b9811e.tar.bz2 |
re PR libfortran/21185 (Improve testsuite results on newlib targets)
PR libfortran/21185
* runtime/compile_options.c (set_options): Fix typo.
* runtime/main.c (store_exe_path): If getcwd is not available,
don't use it.
* intrinsics/getcwd.c: Same thing here.
* io/unix.c (fallback_access): New fallback function for access.
(fix_fd): Don't use dup if it's not available.
* configure.ac: Check for dup and getcwd.
* configure: Regenerate.
* config.h.in: Regenerate.
From-SVN: r128512
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/compile_options.c | 4 | ||||
-rw-r--r-- | libgfortran/runtime/main.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c index 94e1f60..8e0a3fe 100644 --- a/libgfortran/runtime/compile_options.c +++ b/libgfortran/runtime/compile_options.c @@ -108,8 +108,8 @@ set_options (int num, int options[]) /* If backtrace is required, we set signal handlers on most common signals. */ -#if defined(HAVE_SIGNAL_H) && (defined(SIGSEGV) || defined(SIGBUS) \ - || defined(SIGILL) || defined(SIGFPE)) +#if defined(HAVE_SIGNAL) && (defined(SIGSEGV) || defined(SIGBUS) \ + || defined(SIGILL) || defined(SIGFPE)) if (compile_options.backtrace) { #if defined(SIGSEGV) diff --git a/libgfortran/runtime/main.c b/libgfortran/runtime/main.c index be12c59..86777d9 100644 --- a/libgfortran/runtime/main.c +++ b/libgfortran/runtime/main.c @@ -120,7 +120,11 @@ store_exe_path (const char * argv0) } memset (buf, 0, sizeof (buf)); +#ifdef HAVE_GETCWD cwd = getcwd (buf, sizeof (buf)); +#else + cwd = ""; +#endif /* exe_path will be cwd + "/" + argv[0] + "\0" */ path = malloc (strlen (cwd) + 1 + strlen (argv0) + 1); |