public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Arnaud Charlet <charlet@adacore.com>
To: Simon Wright <simon@pushface.org>
Cc: Arnaud Charlet <charlet@adacore.com>,
	Iain Sandoe <idsandoe@googlemail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime
Date: Fri, 17 Nov 2023 09:29:31 +0000	[thread overview]
Message-ID: <20231117092931.GA2219177@adacore.com> (raw)
In-Reply-To: <91AF9F8B-7D2E-455A-96AA-02BE299E4968@pushface.org>

> > Please simplify the above to (untested):
> > 
> > #elif defined (__APPLE__)
> >        /* By default, macOS volumes are case-insensitive, iOS
> >           volumes are case-sensitive.  */
> > #if TARGET_OS_MAC    /* macOS, in older SDK.  */
> >         file_names_case_sensitive_cache = 0;
> > #elif TARGET_OS_OSX  /* macOS, in recent SDK.  */
> >         file_names_case_sensitive_cache = 0;
> > #else                /* assume iOS.  */
> >         file_names_case_sensitive_cache = 1;
> > #endif
> > #else /* Neither Windows nor Apple.  */
> > 	 file_names_case_sensitive_cache = 1;
> > #endif
> > 
> > which is simpler and more readable and should be equivalent AFAICT.
> > 
> > OK with the above change.
> > 
> > Arno
> 
> Sorry, but that wouldn’t work.

Then invert the two first tests, that doesn't change the gist of my suggestion to simplify the
tests.

> TargetConditionals.h is created by Apple as part of SDK construction, so the TARGET_* macros are defined directly (#define TARGET_OS_OSX 1),
> 
> In a newer macOS SDK, both TARGET_OS_MAC and TARGET_OS_OSX are defined and set to 1, and TARGET_OS_MAC covers OSX (macOS), IOS, TV, WATCH and others.
> In an older macOS SDK, TARGET_OS_MAC is defined and set to 1, and none of the others are defined at all.

  reply	other threads:[~2023-11-17  9:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 11:51 Simon Wright
2023-10-31  8:07 ` Iain Sandoe
2023-11-03  8:39 ` Arnaud Charlet
2023-11-04 17:02   ` Simon Wright
2023-11-04 23:28     ` Iain Sandoe
2023-11-06  8:36     ` Arnaud Charlet
2023-11-11 17:47       ` Simon Wright
2023-11-11 18:10         ` Iain Sandoe
2023-11-13 16:03           ` Simon Wright
2023-11-13 16:18             ` Arnaud Charlet
2023-11-16 20:56               ` Simon Wright
2023-11-17  8:37                 ` Arnaud Charlet
2023-11-17  9:06                   ` Simon Wright
2023-11-17  9:29                     ` Arnaud Charlet [this message]
2023-11-17 12:53                       ` Simon Wright
2023-11-17 13:36                         ` Arnaud Charlet
2023-11-17 13:39                           ` Arnaud Charlet
2023-11-17 13:43                           ` Simon Wright
2023-11-21 11:22                             ` Iain Sandoe
2023-11-21 20:25                               ` Simon Wright
2023-11-21 23:13                                 ` Iain Sandoe
2023-11-22 13:54                                   ` Simon Wright
2023-11-22 13:55                                     ` Arnaud Charlet
2023-11-22 14:48                                       ` Iain Sandoe
2023-11-22 15:03                                         ` Iain Sandoe
2023-11-22 15:13                                           ` Simon Wright
2023-11-28 12:16                                             ` Simon Wright
2023-11-28 13:50                                               ` Marc Poulhiès
2023-11-28 16:48                                                 ` Marc Poulhiès
2023-11-22 14:41                                     ` Paul Koning

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=20231117092931.GA2219177@adacore.com \
    --to=charlet@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=idsandoe@googlemail.com \
    --cc=simon@pushface.org \
    /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).