From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24694 invoked by alias); 27 Oct 2014 16:32:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 24665 invoked by uid 89); 27 Oct 2014 16:32:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: USMAMAIL.TILERA.COM Message-ID: <544E7391.20502@tilera.com> Date: Mon, 27 Oct 2014 16:32:00 -0000 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Andrew Pinski , Subject: Re: [PATCH 07/29] Allow generic stat and statfs not have padding for 32bit targets References: <1414396793-9005-1-git-send-email-apinski@cavium.com> <1414396793-9005-8-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-8-git-send-email-apinski@cavium.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00633.txt.bz2 On 10/27/2014 3:59 AM, Andrew Pinski wrote: > --- a/sysdeps/unix/sysv/linux/generic/bits/stat.h > +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h > @@ -42,7 +42,10 @@ > > #if defined __USE_FILE_OFFSET64 > # define __field64(type, type64, name) type64 name > -#elif __WORDSIZE == 64 > +#elif __WORDSIZE == 64 \ > + || (defined(__OFF_T_MATCHES_OFF64_T) \ > + && defined(__INO_T_MATCHES_INO64_T) \ > + && defined (__BLKCNT_T_TYPE_MATCHES_BLKCNT64_T_TYPE)) I'm somewhat skeptical of this approach. I suspect it would be better to have a single #define that says "hey, I use 64-bit kernel types for long" and then use that. If you (for some reason) had ino match ino64, but not off_t match off64_t, this header would then break for ino_t, as far as I can see. It seems better to take the simpler approach, and if some later architecture somehow wants finer granularity, let it be their problem to tease apart the different types here. This single #define would then also feed into my proposed standard __TYPESIZES_PAD32 macro, or whatever it ends up being called. -- Chris Metcalf, Tilera Corp. http://www.tilera.com