X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DC9738708CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1603108901; bh=s1RuE+zAZS15Kb98CeWC1hU77+Al6MfV9J8Z6mr2P8I=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=LLw+BWYOdFbJMFuAXrMb9QuiMKA+5Rqc4LuLGJdwHZT8g9Bk0T18N0FE40thtYsMM O+ITZNDgkWXPCUUri/JlTIOhu1ad9kj+1gRIVYWzSrAen40Iryqa8FJo72tCr5z8nZ 6fXdi2mwfbZ0wDhEWuCvYW43KxKjtMAoGtCoUNVo= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com 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 AT cygwin DOT com Date: Mon, 19 Oct 2020 14:01:27 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: stat st_birthtim(espec) Message-ID: <20201019120127.GG5492@calimero.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <202010190606 DOT 09J666Jp007285 AT ultimate DOT com> MIME-Version: 1.0 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 AT cygwin DOT 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: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple