aboutsummaryrefslogtreecommitdiff
path: root/libiberty/make-temp-file.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2009-07-29 20:01:28 +0000
committerDJ Delorie <dj@redhat.com>2009-07-29 20:01:28 +0000
commitb0832eea407474d0312edfa21734ef12bc28404f (patch)
tree8962365e7f88cf735e1c40c1cbb6508b4029674b /libiberty/make-temp-file.c
parente23cce4514b59135813c79aafdad0cba21558e61 (diff)
downloadgdb-b0832eea407474d0312edfa21734ef12bc28404f.zip
gdb-b0832eea407474d0312edfa21734ef12bc28404f.tar.gz
gdb-b0832eea407474d0312edfa21734ef12bc28404f.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/make-temp-file.c')
-rw-r--r--libiberty/make-temp-file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index eadcf85..13e1925 100644
--- a/libiberty/make-temp-file.c
+++ b/libiberty/make-temp-file.c
@@ -1,5 +1,5 @@
/* Utility to pick a temporary filename prefix.
- Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2001, 2009 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -111,9 +111,14 @@ choose_tmpdir (void)
char *tmpdir;
unsigned int len;
+#ifdef VMS
+ /* Try VMS standard temp logical. */
+ base = try_dir ("/sys$scratch", base);
+#else
base = try_dir (getenv ("TMPDIR"), base);
base = try_dir (getenv ("TMP"), base);
base = try_dir (getenv ("TEMP"), base);
+#endif
#ifdef P_tmpdir
base = try_dir (P_tmpdir, base);