> > 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 via email to