This is the mail archive of the
mailing list for the glibc project.
Re: using _FILE_OFFSET_BITS=64 with a non-gcc compiler
[Get raw message]
Ulrich Drepper writes:
> #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.
#define readdir(d) (((struct dirent *(*) (DIR *)) readdir64) (d))
#define readdir(d) ((struct dirent *) readdir64 (d))
doesn't work either.
struct dirent *(*fp) (DIR *) = &readdir;
would not give a syntax error, but instead store the wrong function pointer.
We really need
#define readdir readdir64