From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58359 "EHLO zimbra.cs.ucla.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754544AbcHSBzD (ORCPT ); Thu, 18 Aug 2016 21:55:03 -0400 Subject: Re: [Linux PATCH] fcntl: add new F_OFD_*32 constants and handle them appropriately To: Zack Weinberg , Christoph Hellwig References: <1471521804-4291-1-git-send-email-jlayton@redhat.com> <20160818170508.GA897@lst.de> <1471541300.2504.23.camel@redhat.com> <20160818173139.GA1140@lst.de> <20160818174607.GL21655@vapier.lan> <20160818175246.GA1433@lst.de> Cc: Jeff Layton , linux-fsdevel@vger.kernel.org, GNU C Library , chrubis@suse.cz From: Paul Eggert Message-ID: <01b37ffd-4ec7-ce69-c7e1-891162f3e4d8@cs.ucla.edu> Date: Thu, 18 Aug 2016 12:36:51 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------12AB8804395F14CF505D80CB" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------12AB8804395F14CF505D80CB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Zack Weinberg wrote: > We could change the libc headers used on old-ILP32 ABIs so that > _FILE_OFFSET_BITS=3D64 is defined by default (matching the LP64-ABI > headers). This would break the ABI of every shared library that > exports a structure (transitively) containing a field of type off_t, > ino_t, fsblkcnt_t, fsfilcnt_t, or rlim_t. As I understand it, most (all important?) such libraries are already comp= iled=20 with _FILE_OFFSET_BITS=3D64 anyway, so their ABIs wouldn't break. How about if we start the transition by deprecating the use of 32-bit off= _t in=20 user or library code on platforms with 32-bit long? The attached patch pl= us lots=20 of similar patches, say (this is just a sketch). Really, it's long since = time=20 that file offsets were 64 bits. --------------12AB8804395F14CF505D80CB Content-Type: text/x-diff; name="deprecate-32-bit-off-t.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="deprecate-32-bit-off-t.patch" diff --git a/libio/stdio.h b/libio/stdio.h index e37f901..a5f65e9 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -88,7 +88,11 @@ typedef _G_va_list va_list; #if defined __USE_UNIX98 || defined __USE_XOPEN2K # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 +# if !_SUPPRESS_FILE_OFFSET_DEPRECATION && __LONG_MAX__ < __LONG_LONG_M= AX__ +typedef __off_t off_t __attribute_deprecated__; +# else typedef __off_t off_t; +# endif # else typedef __off64_t off_t; # endif --------------12AB8804395F14CF505D80CB--