public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gerald Pfeifer <gerald@pfeifer.com>
To: Kamil Rytarowski <n54@gmx.com>, Jeff Law <law@redhat.com>
Cc: gcc-patches@sourceware.org
Subject: Re: [PATCH] Rearrange detection of temporary directory for NetBSD
Date: Tue, 29 Jun 2021 00:45:30 +0200 (CEST)	[thread overview]
Message-ID: <a33f952-7111-b9b-b0e6-428cd0272168@pfeifer.com> (raw)
In-Reply-To: <6dfdc12b-5d90-bf05-efa1-6fb4ccf1242a@gmx.com>

On Thu, 26 Mar 2020, Kamil Rytarowski wrote:
> On 25.03.2020 23:36, Jeff Law wrote:
>> I wouldn't mind dropping /usr/tmp.  That so antiquated that it'd be 
>> non- controversial.  Can you send that as a separate patch.
> Behavior for !__NetBSD__ is out of interest.

This is not a very useful approach in a collaborative project like GCC.

Incremental changes (including cleanups) help and are a good way to get 
engaged, improve the overall code base, and gain support from others 
(who may not have any interest in the __NetBSD__ case, but be willing 
to collaborate).

@Jeff, is the following what you had in mind?  

It passed testing on i686-unknown-freebsd12; okay to push?

Gerald


commit 8365565396cee65aeb6c2e4bfad74e095a3c388c
Author: Gerald Pfeifer <gerald@pfeifer.com>
Date:   Tue Jun 29 00:39:15 2021 +0200

    libiberty: No longer use /usr/tmp
    
    /usr/tmp is antiquated and not present on decently modern systems.
    Remove it from consideration when choosing a directory for temporary
    files.
    
    libiberty:
    
    2021-06-29  Gerald Pfeifer  <gerald@pfeifer.com>
    
            * make-temp-file.c (usrtmp): Remove.
            (choose_tmpdir): Remove use of usrtmp.

diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 1c9138861bd..2f8390cc63a 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-13  Gerald Pfeifer  <gerald@pfeifer.com>
+
+	* make-temp-file.c (usrtmp): Remove.
+	(choose_tmpdir): Remove use of usrtmp.
+
 2021-06-05  John David Anglin  <danglin@gcc.gnu.org>
 
 	PR target/100734
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 7465cec5ea6..cad0645619e 100644
--- a/libiberty/make-temp-file.c
+++ b/libiberty/make-temp-file.c
@@ -81,8 +81,6 @@ try_dir (const char *dir, const char *base)
 }
 
 static const char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
-static const char usrtmp[] =
-{ DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
 static const char vartmp[] =
 { DIR_SEPARATOR, 'v', 'a', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
 
@@ -131,7 +129,6 @@ choose_tmpdir (void)
 
       /* Try /var/tmp, /usr/tmp, then /tmp.  */
       base = try_dir (vartmp, base);
-      base = try_dir (usrtmp, base);
       base = try_dir (tmp, base);
       
       /* If all else fails, use the current directory!  */

  reply	other threads:[~2021-06-28 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 19:29 Kamil Rytarowski
2020-03-25 22:36 ` Jeff Law
2020-03-26  0:39   ` Kamil Rytarowski
2021-06-28 22:45     ` Gerald Pfeifer [this message]
2021-06-29 15:15       ` Jeff Law
2021-06-30 22:03         ` Gerald Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a33f952-7111-b9b-b0e6-428cd0272168@pfeifer.com \
    --to=gerald@pfeifer.com \
    --cc=gcc-patches@sourceware.org \
    --cc=law@redhat.com \
    --cc=n54@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).