This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: using _FILE_OFFSET_BITS=64 with a non-gcc compiler
Paul Eggert <eggert@twinsun.com> writes:
> OK, how about this patch instead? The second sentence tries to mimic
> your wording.
But these words are not usable without context.
Besides, if you read your text you'll see that's really not worth
adding? What has gcc to do with linking? Why excluding all compilers
because very few features cannot be used in the same way as gcc? If
you look at <sys/cdefs.h> you'll see that everything is prepared for
other compilers using transparent renaming.
And one more thing: it should be just as well possible to change the
headers a bit to handle the problem at hand a bit better without
introducing more namespace violations. Changing
#define readdir readdir64
to
#define readdir ((struct dirent *(*) (DIR *)) readdir64)
makes things work with only a little drawback: function pointer
assignments of the form
struct dirent *(*fp) (DIR *) = &readdir;
will fail due to a syntax error. But
struct dirent *(*fp) (DIR *) = readdir;
works and does the same. If this is more acceptable I'll accept a
patch.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------