From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 2CB6F3858D32 for ; Fri, 17 Nov 2023 09:29:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2CB6F3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2CB6F3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700213376; cv=none; b=n5lzx6Utoo6q6dIjOjq2rQSWIytcNI9uR2EmZQoFQVRNiqRxnOg9fJrMkjkLhB69/dXaJgdVPiiz3LczfYsonKIIconEUObD6/PaEo4xnWxsDJVa97DfA6wZCySbAeWCBt94Bg9QKNvpWjjVjr3P3sJuxzNxsyfu/y9ejldapXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700213376; c=relaxed/simple; bh=xHroxcN90JbpHTQX5L0aJFDC9O44ikd+mxAozYcGNmQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=hWq2olVJeCBA5v3PgWS81WY4Sr3UlsOuti8h9+HDypfIRjiK9ALnz6h9BqiabpcDGrTLJVVXizX0kp81ZiidMuOSjyfuz72piNr1pB3ib0D05DMhrG4KL6JAyFZDCdCNzSzu66XRMbaLXLAj7pTreMjJP/rY4ixv45dQ94GbAH8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-507962561adso2614551e87.0 for ; Fri, 17 Nov 2023 01:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1700213373; x=1700818173; darn=gcc.gnu.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=YdGGt2gK9/OXKVWmvsoUfNiC41yGJjHEN0LxluX+6i8=; b=S1oLfcsdqmHJxpRrmXbfB3I6dpvev2znqqiFqdeDMK35igQvvwFj8JOX2VbINfmAYO 009ishDzEqIPH+F0/YqVrC8ujMou0w29gcqAl9do/jhfrM6QA2dswC/O3ROj3EcyvHi2 VHlz66CmpE5gDMVLCJ84JA9HKZVPF5DqTbMmdyDaDQYZ2nCrukbxmeIoJ0PFMNuNSbM7 Nuu7Mso3YVbDiSV/T+r21EIbmwsdvaJlGA1F6HUYZiq5wFRFp48h6+llF2F3lEFWkoX+ a7BxDrCghioiiihj7M+GTGKuB5xlOWqAai2zWId2b2JrSAUVOM0TuSF1gUmEVBEJXsmo 4tJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700213373; x=1700818173; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YdGGt2gK9/OXKVWmvsoUfNiC41yGJjHEN0LxluX+6i8=; b=MNvmXciFTaxw31d5Q8AEDRz/z1iltp9+qX1RYbwzOJbjUR2IVrOKsLfYn0M34Nwuu8 gE2AuiPtESP2+5w+A3Wb/uGZYu35YoG6fgZwFbj1sy3GCXpYqVwa1z5hfd5KRMOqWNCW RCH40l9tBzXTPvsRMbU0/wWuUtGjF/+nR1zTi7BcyAzkxpZpGKY5nzxqxw79/tUTLOIN ML53/tvWR7NqyR4DSA/vB4Wd1qH+fstyVuK2/UTsUgMttNIejcBK+ouWXF1pQmx0RdjF 8hYofUCNNnMECIT/bNf6PiVkne0Xxr8b9mwQ484pgdPM4f32FpPuKiijSZxCf15T+XH/ t64w== X-Gm-Message-State: AOJu0YwY9jpHuEizxmgJmu1D0TlEM8APMxuHUucBOTQRk8GCRsn9s35Q yVJGqXCkDiPHWv1Q8XYjpudg7w== X-Google-Smtp-Source: AGHT+IHYoQEZd/pMS+SNyzEBOd4+Wu9Ini0EJMfvUb4wpirJhnCKa3ODScooEm7aWyQTiM8ySW4Dng== X-Received: by 2002:a19:8c10:0:b0:50a:9652:31d4 with SMTP id o16-20020a198c10000000b0050a965231d4mr5777511lfd.22.1700213372674; Fri, 17 Nov 2023 01:29:32 -0800 (PST) Received: from localhost ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id s15-20020adfea8f000000b00323287186aasm1746174wrm.32.2023.11.17.01.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 01:29:32 -0800 (PST) Date: Fri, 17 Nov 2023 09:29:31 +0000 From: Arnaud Charlet To: Simon Wright Cc: Arnaud Charlet , Iain Sandoe , GCC Patches Subject: Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime Message-ID: <20231117092931.GA2219177@adacore.com> References: <20231103083926.GA2587057@adacore.com> <6581E8BE-9D03-4F31-B5C4-B9DC79BBE1A7@pushface.org> <20231106083644.GA2141436@adacore.com> <0296D5C3-F810-4754-862C-72D7F79563EB@googlemail.com> <8324DEB5-442B-4B18-8CA8-29A96960DD14@pushface.org> <20231113161827.GA61280@adacore.com> <5397C900-1214-4DB4-ADFA-AB4C4581475F@pushface.org> <20231117083749.GB3688470@adacore.com> <91AF9F8B-7D2E-455A-96AA-02BE299E4968@pushface.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <91AF9F8B-7D2E-455A-96AA-02BE299E4968@pushface.org> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > > 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.