Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Eli Zaretskii <eliz@gnu.org>, orgads@gmail.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix cache dir resolving on Windows
Date: Tue, 04 Jun 2019 15:06:00 -0000	[thread overview]
Message-ID: <4b1430a8-e637-6582-238b-e29f5010d7f0@simark.ca> (raw)
In-Reply-To: <837ea1tnpa.fsf@gnu.org>

On 2019-06-04 10:44 a.m., Eli Zaretskii wrote:
>> From: orgads@gmail.com
>> Cc: Orgad Shaneh <orgads@gmail.com>
>> Date: Mon,  3 Jun 2019 22:37:16 +0300
>>
>> From: Orgad Shaneh <orgads@gmail.com>
>>
>> ... when not running from MSYS environment, and HOME is not set.
>> ---
>>  gdb/common/pathstuff.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/gdb/common/pathstuff.c b/gdb/common/pathstuff.c
>> index 2b1669a5b9..edb8a1fcda 100644
>> --- a/gdb/common/pathstuff.c
>> +++ b/gdb/common/pathstuff.c
>> @@ -231,6 +231,10 @@ get_standard_cache_dir ()
>>  #endif
>>  
>>    const char *home = getenv ("HOME");
>> +#ifdef _WIN32
>> +  if (home == nullptr)
>> +      home = getenv ("USERPROFILE");
>> +#endif
>>    if (home != NULL)
> 
> This is against the MS platform recommendations regarding "known
> folders", see
> 
>   https://docs.microsoft.com/en-us/windows/desktop/shell/knownfolderid
>   https://docs.microsoft.com/en-us/windows/desktop/shell/csidl
> 
> But maybe we don't care about that.  I know that many applications
> ported from Unix don't.

If it's not too complicated to do The Right Thing (use these  and be a good citizen,
I would prefer that.  But I won't be the one writing the change for Windows
and maintaining it, so I won't force it either.

Simon


  reply	other threads:[~2019-06-04 15:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 19:37 orgads
2019-06-04 14:44 ` Eli Zaretskii
2019-06-04 15:06   ` Simon Marchi [this message]
2019-06-04 16:17     ` Eli Zaretskii
2019-06-07  6:21 ` orgads
2019-06-07  6:23   ` Orgad Shaneh
2019-06-07  6:27   ` Eli Zaretskii
2019-06-07  6:27 ` orgads
2019-06-07  7:36   ` Eli Zaretskii
2019-06-07  8:01     ` Eli Zaretskii
     [not found]       ` <CAGHpTB+Y+kO=ZiKtTft3yG4mMR+27DYfqJGQWBLvu=VKCgRyLw@mail.gmail.com>
2019-06-07 12:29         ` Eli Zaretskii
2019-06-07 18:10   ` Tom Tromey

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=4b1430a8-e637-6582-238b-e29f5010d7f0@simark.ca \
    --to=simark@simark.ca \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=orgads@gmail.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