Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3 Correct temporary directory preference order i...



details:   https://anonhg.NetBSD.org/src/rev/85a62e672501
branches:  trunk
changeset: 339796:85a62e672501
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Aug 10 15:45:40 2015 +0000

description:
Correct temporary directory preference order in libiberty's choose_tmpdir().

Because it is intended to be persistent, /var/tmp is about the worst possible
choice for temporary files for most users of libiberty.  /tmp works better,
because the the defined semantics of /tmp allow for a non-persistent tmpfs
to be used.  This should improve performance when /tmp is a tmpfs and it is
difficult or impossible to have an environment variable or command line -pipe
flag passed to every piece of the toolchain.

diffstat:

 external/gpl3/binutils/dist/libiberty/make-temp-file.c |  4 ++--
 external/gpl3/gcc/dist/libiberty/make-temp-file.c      |  4 ++--
 external/gpl3/gdb/dist/libiberty/make-temp-file.c      |  4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r e33645de0293 -r 85a62e672501 external/gpl3/binutils/dist/libiberty/make-temp-file.c
--- a/external/gpl3/binutils/dist/libiberty/make-temp-file.c    Mon Aug 10 09:32:01 2015 +0000
+++ b/external/gpl3/binutils/dist/libiberty/make-temp-file.c    Mon Aug 10 15:45:40 2015 +0000
@@ -130,10 +130,10 @@
        base = try_dir (P_tmpdir, base);
 #endif
 
-      /* Try /var/tmp, /usr/tmp, then /tmp.  */
+      /* Try /tmp, /var/tmp, then /usr/tmp.  */
+      base = try_dir (tmp, base);
       base = try_dir (vartmp, base);
       base = try_dir (usrtmp, base);
-      base = try_dir (tmp, base);
       
       /* If all else fails, use the current directory!  */
       if (base == 0)
diff -r e33645de0293 -r 85a62e672501 external/gpl3/gcc/dist/libiberty/make-temp-file.c
--- a/external/gpl3/gcc/dist/libiberty/make-temp-file.c Mon Aug 10 09:32:01 2015 +0000
+++ b/external/gpl3/gcc/dist/libiberty/make-temp-file.c Mon Aug 10 15:45:40 2015 +0000
@@ -130,10 +130,10 @@
        base = try_dir (P_tmpdir, base);
 #endif
 
-      /* Try /var/tmp, /usr/tmp, then /tmp.  */
+      /* Try /tmp, /var/tmp, then /usr/tmp.  */
+      base = try_dir (tmp, base);
       base = try_dir (vartmp, base);
       base = try_dir (usrtmp, base);
-      base = try_dir (tmp, base);
       
       /* If all else fails, use the current directory!  */
       if (base == 0)
diff -r e33645de0293 -r 85a62e672501 external/gpl3/gdb/dist/libiberty/make-temp-file.c
--- a/external/gpl3/gdb/dist/libiberty/make-temp-file.c Mon Aug 10 09:32:01 2015 +0000
+++ b/external/gpl3/gdb/dist/libiberty/make-temp-file.c Mon Aug 10 15:45:40 2015 +0000
@@ -130,10 +130,10 @@
        base = try_dir (P_tmpdir, base);
 #endif
 
-      /* Try /var/tmp, /usr/tmp, then /tmp.  */
+      /* Try /tmp, /var/tmp, then /usr/tmp.  */
+      base = try_dir (tmp, base);
       base = try_dir (vartmp, base);
       base = try_dir (usrtmp, base);
-      base = try_dir (tmp, base);
       
       /* If all else fails, use the current directory!  */
       if (base == 0)



Home | Main Index | Thread Index | Old Index