From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4626 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: stat.h Date: Mon, 3 Mar 2014 23:20:18 -0500 Message-ID: <20140304042018.GG184@brightrain.aerifal.cx> References: <20140303194214.GC7372@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393906832 9805 80.91.229.3 (4 Mar 2014 04:20:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 04:20:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4630-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 04 05:20:42 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WKgqP-00079J-Pz for gllmg-musl@plane.gmane.org; Tue, 04 Mar 2014 05:20:41 +0100 Original-Received: (qmail 22487 invoked by uid 550); 4 Mar 2014 04:20:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 22479 invoked from network); 4 Mar 2014 04:20:40 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4626 Archived-At: On Tue, Mar 04, 2014 at 06:15:01AM +0200, Paul Schutte wrote: > Thanks and I agree with padsp being messy. > > My question really boils down to > Should 'struct stat64' be used from within a program and if so, which > header file should I include ? If you want "struct stat64", make sure _GNU_SOURCE or _LARGEFILE64_SOURCE is defined before including any system headers (best way is with -D_GNU_SOURCE etc. in your CFLAGS) and include sys/stat.h. However, it would be better to just use "struct stat", etc. (With glibc, you need -D_FILE_OFFSET_BITS=64 in your CFLAGS to make this work right; with musl it always works.) Rich