This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Mike Frysinger <vapier at gentoo dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, OndÅej BÃlka <neleai at seznam dot cz>, Denis Obrezkov <reprofy at etersoft dot ru>
- Date: Thu, 13 Mar 2014 23:41:48 -0700
- Subject: Re: [RFC] Make _FILE_OFFSET_BITS=64 default.
- Authentication-results: sourceware.org; auth=none
- References: <1393521776-1102-1-git-send-email-reprofy at etersoft dot ru> <26837730 dot jZzKCPMtpS at vapier> <Pine dot LNX dot 4 dot 64 dot 1403131254080 dot 4888 at digraph dot polyomino dot org dot uk> <1818532 dot 29kOdgNHi0 at vapier>
Mike Frysinger wrote:
i'm debating adding it to the next Gentoo glibc version to gather
some actual data since no one seems to want to move w/out data, but no one
wants to gather data either.
Joseph's message gave me pause, as I worry it's asking for an enormous
task that can never truly said to be done. Regardless, I took one step
to do this, and exhaustively surveyed all libraries installed on my
Fedora 20 host as part of my routine development for building coreutils,
GNU Emacs, etc. I found the following issues:
glibc's own fts.h refuses to compile if __USE_FILE_OFFSET64 is defined.
zlib's zlib.h attempts to work around the glibc problems with
_FILE_OFFSET_BITS, and its workaround would need adjusting if glibc
changed the default.
Several libraries use APIs that accept affected data types. These
libraries are all compiled with _FILE_OFFSET_BITS #defined to be 64, so
the proposed change would be beneficial as it would fix any applications
that are currently mistakenly compiled without defining
_FILE_OFFSET_BITS to be 64. These libraries are:
* fontconfig's fontconfig/fontconfig.h defines a function
FcDirCacheLoadFile that accepts struct stat *
* gawk's gawkapi.h defines a type awk_input_buf_t that has a struct stat.
* glib's glib-2.0/glib/gstdio.h defines g_stat, g_lstat, GStatBuf, all
of which use struct stat.
* Berkeley DB's libdb/db.h defines db_env_set_func_ftruncate,
db_env_set_func_pread, db_env_set_func_pwrite, db_env_set_func_seek, all
functions that accept functions that accept off_t arguments.
* libselinux's selinux/selinux.h defines a function
matchpathcon_filespec_add that accepts an ino_t.
Here are the libraries I looked at as part of my inspection (these are
Fedora 20 package names).
GConf2 ImageMagick OpenEXR alsa-lib at-spi2-atk atk bzip2 cairo
cairo-gobject dbus dbus-glib expat fontconfig freetype gdbm gdk-pixbuf2
ghostscript giflib glib2 glibc gnustep-base gnustep-gui gnutls gpm gtk3
harfbuzz ilmbase jasper java-1.7.0-openjdk keyutils-libs krb5 lcms2
libICE libSM libX11 libXau libXaw libXcomposite libXcursor libXdamage
libXext libXfixes libXft libXi libXinerama libXmu libXpm libXrandr
libXrender libXt libXxf86vm libacl libattr libcom_err libdb libdrm
libicu libjpeg-turbo liblockfile libotf libpng librsvg2 libselinux
libsepol libstdc++ libtasn1 libtiff libverto libwayland-client
libwayland-cursor libwebp libxcb libxkbcommon libxml2 m17n-lib
mesa-libEGL mesa-libGL mesa-libGLU ncurses openssl p11-kit pango pcre
perl pixman systemtap-sdt valgrind wayland xorg-x11-proto xz zlib