This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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.

Right,
    #define readdir(d) (((struct dirent *(*) (DIR *)) readdir64) (d))
or
    #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

Bruno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]