lkml.org 
[lkml]   [1998]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: OFFTOPIC: e2fsprogs and +2Gb partitions
From
Date
>>>>> "TT" == Theodore Y Ts'o <tytso@MIT.EDU> writes:

TT> From: Ulrich Drepper <drepper@cygnus.com>
TT> Date: 12 Jun 1998 11:41:02 -0700

TT> And a test for the prototype isn't necessary. Simply add a test for
TT> lseek64 and if this function is not available test for llseek with
TT> code like this:

TT> That won't work, because glibc 2.0.7, which ships with Redhat 5.0,
TT> doesn't have lseek64. So if I adopted your suggestion, folks with
TT> RedHat 5.0 who tried recompile e2fsprogs would trash their > 2GB
TT> filesystems. Hence, I still have to test for the prototype.

NO, NO, NO! The prototype is the wrong way to test for a function.
The simple, easy, and reliable way with autoconf is:
AC_CHECK_FUNCS(llseek)
AC_CHECK_FUNCS(lseek64)

Which does a linkage test! This is totally reliable on both libc5 &
glibc 2.0.6. I just tried this.

You might want to add a check for a prototype in the header files,
since you seem to know how to do this hard and unreliable thing, to
see if you need to declare llseek, but otherwise I don't see the
point.

TT> This is what I mean about compatibility. What I do has to work for all
TT> versions of Linux, not just the bleeding-edge glibc. E2fsprogs will
TT> still work and compile for systems using a.out shared libraries. I just
TT> wish that the glibc developers spent as much time worrying about
TT> backwards compatibility issues as I do....

Well it would be nice if there was a sanity check for large partitions
so your application doesn't fail when the offset is larger than lseek,
or llseek or in the futurer lseek64 can handle.

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.078 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site