Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-28 Thread Marc Poulhiès
Marc Poulhiès writes: > Simon Wright writes: >> gcc/ada/Changelog: >> >> 2023-11-22 Simon Wright >> >> PR ada/111909 >> >> Can we commit this one now, please? > > Hello Simon, > > Yes we can commit this one, as both Iain and Arnaud ACKed it. > > I'll create a proper commit with the change

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-28 Thread Marc Poulhiès
Simon Wright writes: > gcc/ada/Changelog: > > 2023-11-22 Simon Wright > > PR ada/111909 > > Can we commit this one now, please? Hello Simon, Yes we can commit this one, as both Iain and Arnaud ACKed it. I'll create a proper commit with the change and the fixed commit log and merge it. Th

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-28 Thread Simon Wright
> On 22 Nov 2023, at 15:13, Simon Wright wrote: > > > >> On 22 Nov 2023, at 15:03, Iain Sandoe wrote: >> >> >> >>> On 22 Nov 2023, at 14:48, Iain Sandoe wrote: >>> >>> >>> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: >>> #if defined (__APPLE__) >>> -#include >>

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Simon Wright
> On 22 Nov 2023, at 15:03, Iain Sandoe wrote: > > > >> On 22 Nov 2023, at 14:48, Iain Sandoe wrote: >> >> >> >>> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: >>> >> #if defined (__APPLE__) >> -#include > > If removing unistd.h is intentional (i.e. you determined th

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Iain Sandoe
> On 22 Nov 2023, at 14:48, Iain Sandoe wrote: > > > >> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: >> > #if defined (__APPLE__) > -#include If removing unistd.h is intentional (i.e. you determined that it’s no longer needed for Darwin), then we should ma

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Iain Sandoe
> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: > #if defined (__APPLE__) -#include >>> >>> If removing unistd.h is intentional (i.e. you determined that it’s no longer >>> needed for Darwin), then we should make that a separate patch. >> >> I thought that I’d had to include uni

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Paul Koning
> On Nov 22, 2023, at 8:54 AM, Simon Wright wrote: > > On 21 Nov 2023, at 23:13, Iain Sandoe wrote: > >>> #if defined (__APPLE__) >>> -#include >> >> If removing unistd.h is intentional (i.e. you determined that it’s no longer >> needed for Darwin), then we should make that a separate patc

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Arnaud Charlet
> >> #if defined (__APPLE__) > >> -#include > > > > If removing unistd.h is intentional (i.e. you determined that it’s no longer > > needed for Darwin), then we should make that a separate patch. > > I thought that I’d had to include unistd.h for the first patch in this > thread; clearly not! >

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Simon Wright
On 21 Nov 2023, at 23:13, Iain Sandoe wrote: >> #if defined (__APPLE__) >> -#include > > If removing unistd.h is intentional (i.e. you determined that it’s no longer > needed for Darwin), then we should make that a separate patch. I thought that I’d had to include unistd.h for the first patch

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-21 Thread Iain Sandoe
Hi Simon, Thanks for persevering - I will keep the original patch, pending some chance to fix the earlier OS issues. I’ll check this on OS versions with older SDKs that do not have the TARGET_OS_XX conditionals. - One small nit below, Iain > On 21 Nov 2023, at 20:25, Simon Wright wrote:

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-21 Thread Simon Wright
On 21 Nov 2023, at 11:22, Iain Sandoe wrote: > > Hello Simon, Arno, > >> On 17 Nov 2023, at 13:43, Simon Wright wrote: >> >>> Apple’s naming is definitely confusing in this area! In current SDKs, TARGET_OS_MAC means code is being generated for a Mac OS X variant, w

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-21 Thread Iain Sandoe
Hello Simon, Arno, > On 17 Nov 2023, at 13:43, Simon Wright wrote: > >> >>> Apple’s naming is definitely confusing in this area! >>> >>> In current SDKs, TARGET_OS_MAC means code is being generated for a Mac OS X >>> variant, >>> which covers OSX, IOS, Watch … ; to determine which kind of de

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Simon Wright
> >> Apple’s naming is definitely confusing in this area! >> >> In current SDKs, TARGET_OS_MAC means code is being generated for a Mac OS X >> variant, >> which covers OSX, IOS, Watch … ; to determine which kind of device, you have >> to check the >> specific define for that device - OSX corr

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Arnaud Charlet
> OK so then the following is sufficient for our needs: > > #elif defined (__APPLE__) >/* By default, macOS volumes are case-insensitive, iOS > volumes are case-sensitive. */ > #if TARGET_OS_IOS > file_names_case_sensitive_cache = 1; > #else > file_names_case_

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Arnaud Charlet
> Apple’s naming is definitely confusing in this area! > > In current SDKs, TARGET_OS_MAC means code is being generated for a Mac OS X > variant, > which covers OSX, IOS, Watch … ; to determine which kind of device, you have > to check the > specific define for that device - OSX corresponds to

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Simon Wright
>>> 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; >>> #e

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Arnaud Charlet
> > 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; > > #

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Simon Wright
On 17 Nov 2023, at 08:37, Arnaud Charlet wrote: > >> Also, should the test code below (between %%%) be included in the >> testsuite? > > It would be good but tests shouldn't output anything, they should be self > testing, > and you will need to deal with making the test portable to all targets.

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-17 Thread Arnaud Charlet
> Also, should the test code below (between %%%) be included in the > testsuite? It would be good but tests shouldn't output anything, they should be self testing, and you will need to deal with making the test portable to all targets. Given that the compiler itself uses this feature, I don't th

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-16 Thread Simon Wright
On 13 Nov 2023, at 16:18, Arnaud Charlet wrote: > > OK, I thought there would be some defines that we could use for that, too > bad if there isn't > and indeed we might need to perform another runtime check then as > suggested by Iain. I can see a possible interface,

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-13 Thread Arnaud Charlet
> >>> OK, I thought there would be some defines that we could use for that, too > >>> bad if there isn't > >>> and indeed we might need to perform another runtime check then as > >>> suggested by Iain. > >> > >> I can see a possible interface, operatingSystemVersion in NSProcessInfo.h > >> - Ob

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-13 Thread Simon Wright
On 11 Nov 2023, at 18:10, Iain Sandoe wrote: > >> On 11 Nov 2023, at 07:47, Simon Wright wrote: >> >> On 6 Nov 2023, at 08:36, Arnaud Charlet wrote: >>> > So without changing fundamentally the model, you can't decide dynamically > for the whole > system. Making the choice based o

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-11 Thread Iain Sandoe
> On 11 Nov 2023, at 07:47, Simon Wright wrote: > > On 6 Nov 2023, at 08:36, Arnaud Charlet wrote: >> So without changing fundamentally the model, you can't decide dynamically for the whole system. Making the choice based on the current directory is pretty random, since

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-11 Thread Simon Wright
On 6 Nov 2023, at 08:36, Arnaud Charlet wrote: > >>> So without changing fundamentally the model, you can't decide dynamically >>> for the whole >>> system. Making the choice based on the current directory is pretty random, >>> since the current >>> directory isn't well defined at program's sta

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-06 Thread Arnaud Charlet
> > So without changing fundamentally the model, you can't decide dynamically > > for the whole > > system. Making the choice based on the current directory is pretty random, > > since the current > > directory isn't well defined at program's start up and could be pretty much > > any filesystem.

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-04 Thread Iain Sandoe
Hi Folks > On 4 Nov 2023, at 17:02, Simon Wright wrote: > > On 3 Nov 2023, at 08:39, Arnaud Charlet wrote: >> So without changing fundamentally the model, you can't decide dynamically >> for the whole >> system. Making the choice based on the current directory is pretty random, >> since the

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-04 Thread Simon Wright
On 3 Nov 2023, at 08:39, Arnaud Charlet wrote: > In addition to the non portable issues already mentioned, this change isn't > OK also > for other reasons. > > Basically this function is global and decides once for all on the case > sensitivity, while > the case sensitiviy is on a per filsyste

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-03 Thread Arnaud Charlet
Hi Simon, In addition to the non portable issues already mentioned, this change isn't OK also for other reasons. Basically this function is global and decides once for all on the case sensitivity, while the case sensitiviy is on a per filsystem basis as you noted. So without changing fundament

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-10-31 Thread Iain Sandoe
Hi Simon, (please cc me on Darwin-related patches) > On 29 Oct 2023, at 11:51, Simon Wright wrote: > > This change affects only Ada. > > In gcc/ada/adaint.c(__gnat_get_file_names_case_sensitive), the > assumption for __APPLE__ is that file names are case-insensitive > unless __arm__ or __arm64

[PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-10-29 Thread Simon Wright
This change affects only Ada. In gcc/ada/adaint.c(__gnat_get_file_names_case_sensitive), the assumption for __APPLE__ is that file names are case-insensitive unless __arm__ or __arm64__ are defined, in which case file names are declared case-sensitive. The associated comment is "By default, we