Return-Path: X-Original-To: apmail-apr-dev-archive@www.apache.org Delivered-To: apmail-apr-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46B0610317 for ; Wed, 5 Mar 2014 22:40:36 +0000 (UTC) Received: (qmail 48465 invoked by uid 500); 5 Mar 2014 22:40:34 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 48366 invoked by uid 500); 5 Mar 2014 22:40:32 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 48358 invoked by uid 99); 5 Mar 2014 22:40:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 22:40:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [173.201.193.107] (HELO p3plsmtpa08-06.prod.phx3.secureserver.net) (173.201.193.107) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 22:40:25 +0000 Received: from hub ([76.252.112.72]) by p3plsmtpa08-06.prod.phx3.secureserver.net with id Zyg11n0021Zmh9Y01yg1mM; Wed, 05 Mar 2014 15:40:03 -0700 Date: Wed, 5 Mar 2014 16:39:59 -0600 From: "William A. Rowe Jr." To: dev@apr.apache.org Subject: Darwin HFS+ filename case patch 1/2 Message-ID: <20140305163959.6f0362c8@hub> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org You can find the first of two patches, this first for the apr_fileinfo api, which introduces [f]stat style support to resolve the canonical form of a given filename. APR_FINFO_NAME should return the corrected case/filesystem representation of the given name. http://people.apache.org/~wrowe/osx_fileattr.patch This is my first complete attempt at using getattrlist, an osx-specific call, and I am open to suggestions on feature detection. Right now it simply counts on finding and using getattrlist before failing over on a stat call. The patch calls out the fact that we should revisit apr's inode and similar fields which should have (from APR's perspective) been fixed at 64 bits for future growth. It also calls out apr_file_info_get_locked is neither publicly published nor used, and needs to be removed from apr-2.0.0. The second patch will be needed in the apr_filepath API, because the filename case canonicalization logic exists now only in the Win32, OS2 and Netware forks. OS/X fans, please check it out! It would be particularly helpful if anyone wanted to benchmark against stat() by commenting out the wanted translation of APR_FINFO_NAME ro ATTR_CMN_NAME, so that we compare apples to apples.