From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4630 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: Re: stat.h Date: Tue, 4 Mar 2014 07:33:49 +0200 Message-ID: References: <20140303194214.GC7372@port70.net> <20140304042018.GG184@brightrain.aerifal.cx> <20140304053116.GH184@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b873a10af924d04f3c13fc9 X-Trace: ger.gmane.org 1393911234 18133 80.91.229.3 (4 Mar 2014 05:33:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 05:33:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4634-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 04 06:34:03 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 1WKhzN-0006dH-U2 for gllmg-musl@plane.gmane.org; Tue, 04 Mar 2014 06:34:02 +0100 Original-Received: (qmail 30260 invoked by uid 550); 4 Mar 2014 05:34:01 -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 30246 invoked from network); 4 Mar 2014 05:34:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5LT3Biede+MTgf+aYeI03wLWkEd2NfduC/Cy1lscCUs=; b=G8b0gxfzaaWdviALP9CUHq/yFDGtHwSvsmu5TPaKgkO2NWdvcNq6Z9zQqNk+lPiRBb j+plBGvJ1qE2G98xMD0dLkqbi6kJOHHLAC5exVbzXoS/VfoKy0vPHQLCMBWCCZ6zSv2F fJAgcZby0NDdAvpLBvHsk2ilVZUutFDAx7m2c9FoV2n+co0dJbqdYGKdEhFdLZ6p5tPx x4NN+6WaqgiKBcc6O2p+bHlTWxaFv+bj/9rTszf672zYagzvBDFJjZPl6tc546KUDtos OGxienJNZhEPH6AfY/hoDhA6R318NKhBeK76NmqqkzzS/HnCV143i94Sl6+iKOf9c8RX VS+g== X-Received: by 10.194.202.230 with SMTP id kl6mr24672242wjc.9.1393911229549; Mon, 03 Mar 2014 21:33:49 -0800 (PST) In-Reply-To: <20140304053116.GH184@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:4630 Archived-At: --047d7b873a10af924d04f3c13fc9 Content-Type: text/plain; charset=ISO-8859-1 Thanks On Tue, Mar 4, 2014 at 7:31 AM, Rich Felker wrote: > On Tue, Mar 04, 2014 at 07:18:05AM +0200, Paul Schutte wrote: > > Hi > > > > Hope I am not too anoying ... ;-) > > > > I have tried both _GNU_SOURCE and _LARGEFILE64_SOURCE and in neither case > > do I get a definition for 'struct stat64' > > > > If I understand correctly then source using 'struct stat64' should be > fixed > > to use 'struct stat' instead ? > > If this is not correct, then 'struct stat64' should probably be added to > > as only the following are defined there: > > > > #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) > > #define stat64 stat > > This defines "struct stat64", which the preprocessor replaces with > "struct stat". If that's not working it's because the source file is > doing something bogus (like #undef stat64, perhaps). > > In any case, just fixing the source to use "stat" instead of "stat64" > (and likewise for any other *64 mess) is the best approach. > > Rich > --047d7b873a10af924d04f3c13fc9 Content-Type: text/html; charset=ISO-8859-1
Thanks


On Tue, Mar 4, 2014 at 7:31 AM, Rich Felker <dalias@aerifal.cx> wrote:
On Tue, Mar 04, 2014 at 07:18:05AM +0200, Paul Schutte wrote:
> Hi
>
> Hope I am not too anoying ... ;-)
>
> I have tried both _GNU_SOURCE and _LARGEFILE64_SOURCE and in neither case
> do I get a definition for 'struct stat64'
>
> If I understand correctly then source using 'struct stat64' should be fixed
> to use 'struct stat' instead ?
> If this is not correct, then 'struct stat64' should probably be added to
> <sys/stat.h> as only the following are defined there:
>
> #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
> #define stat64 stat

This defines "struct stat64", which the preprocessor replaces with
"struct stat". If that's not working it's because the source file is
doing something bogus (like #undef stat64, perhaps).

In any case, just fixing the source to use "stat" instead of "stat64"
(and likewise for any other *64 mess) is the best approach.

Rich

--047d7b873a10af924d04f3c13fc9--