summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-15 14:52:46 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-15 14:52:46 +0000
commite0582811ed1518fc811f46d85585cba6e29f7027 (patch)
tree0048e16af72d2eef9bf9f9e8ac0d78574ea4bf40 /libgfortran/runtime
parent4af80cde4854a2046aab66018a343345e3e19d7c (diff)
downloadgcc-e0582811ed1518fc811f46d85585cba6e29f7027.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/compile_options.c4
-rw-r--r--libgfortran/runtime/main.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libgfortran/runtime/compile_options.c b/libgfortran/runtime/compile_options.c
index 94e1f604b2a..8e0a3fe30ce 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 be12c591529..86777d9c70e 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);