From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id 8C8E13854824 for ; Mon, 19 Oct 2020 12:01:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8C8E13854824 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin@cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MEmEf-1kfon50ugl-00GKG6 for ; Mon, 19 Oct 2020 14:01:28 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id CD9AFA8078C; Mon, 19 Oct 2020 14:01:27 +0200 (CEST) Date: Mon, 19 Oct 2020 14:01:27 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: stat st_birthtim(espec) Message-ID: <20201019120127.GG5492@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <202010190606.09J666Jp007285@ultimate.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202010190606.09J666Jp007285@ultimate.com> X-Provags-ID: V03:K1:rxQiWqdM8CJ+mfb9ZBzuu6OykRYjdKtJiliu7V/USNB+VbYtRbl q3vCEtvrdolv6uppCLpUn76NL7/hoXNhJqXmmMUN2d1UkIalpnFag+ZKJApS6jMT7wAF1Na rSmEkobX1zKniE+LpGAFfhvms4JJvwG1a3syE+LVUpNHFrCe1mzJXRenyZoH1cH8Z5bX+Jc qHRL3ckl8BNln1UFU52Eg== X-UI-Out-Filterresults: notjunk:1;V03:K0:YmTwJN3SJcQ=:7YMTwYEX1WOpk/tWaH/GQd KaInOsPJr/pMiNQXutqvfZ/7rJQ3Amwrfos5fDW+/YEGyyTwOaYpSqueyNlFHs3Y8gMB6M0+p WolvoC6hHaww5+s1R8woEjGTgMNLivXnw7AMH/oZlfw5wkF93I3ZTwZAyqEZfXnSymaiODx9v WXP2M6vV6HGvwuSVF7mVL6GeUuG6QHNs03bqtCSEB2mowLhmOeZ66pP+LlBE/5/s+JqZ9wBWy cHyMqm0mk0z4myvmBFXM3Q8X1a6c7PMkhU5o7ooqCMhuMjQOHKdhJTZD9EVZspsHmbJf5MEc4 6913GFJA71DIcl6zPXMDi2b+itkBWk3sAvsZy1FNBUEfsPDJkRABa5rW15TuAQgzbwpRQf/0p Fc3gQ51idd9FEe9N1ZeNlPxX5RPa7HFFPjBnFUE0zgmzs14+wvMG8Z5xBXTGDV1+5kB6MTypu tZifVN4qIg== X-Spam-Status: No, score=-100.4 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2020 12:01:40 -0000 On Oct 19 02:06, Phil Budne wrote: > While checking if an OSS project of mine (www.snobol4.org/csnobol4) > compiled cleanly under Cygwin, I was happy to discover that struct > stat contains file birth time as on various BSD based systems. > > BUT, I was unhappy to find out that MacOS 10.15 and Cygwin 3.1.7 have > non-overlapping definitions for birth time information. > > FreeBSD 12, NetBSD 9, and OSX 10.15 all have a "timespec" available as > "st_birthtimespec", but Cygwin does not. > > On FreeBSD, NetBSD, and Cygwin the actual member of struct stat is > st_birthtim, but on OSX, the member is st_birthtimespec, and there is > no define for st_birthtim. > > A st_birthtimespec define in cygwin/stat.h would make it easier to > write portable code. Well, portable code should use the st_atim/st_mtim/st_ctim members directly and not use st_birthtim at all. For the headers we're usually looking for Linux compatibility in the first place and if that's any indication, we should add all the st_XYZtimensec members, but *only* if __USE_XOPEN2K8 is defined (equivalent _XOPEN_SOURCE >= 700 for Cygwin/newlib) GLibc does not provide any st_XYZtimespec definitions, though. I don't think it really makes a lot of sense to add those with portability in mind. Corinna