[PATCH v4 02/13] support: Add <support/xdirent.h>

Florian Weimer fweimer@redhat.com
Thu Sep 5 09:27:21 GMT 2024


* DJ Delorie:

> Florian Weimer <fweimer@redhat.com> writes:
>> Use static functions for readdir/readdir_r, so that
>> -D_FILE_OFFSET_BITS=64 does not improperly redirect calls to the wrong
>> implementation.
>
> LGTM but one question about the DIAG_* placement.
>
> Reviewed-by: DJ Delorie <dj@redhat.com>

Thanks!

>> +  /* The functions readdir_r, readdir64_r were deprecated in glibc 2.24.  */
>> +  DIAG_PUSH_NEEDS_COMMENT;
>> +  DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
>
> Does this need to go before the headers that define those?  I'm thinking
> of the problem I had with FORTIFY_SOURCE and diagnostic warnings.

No, I think it has to go around the inline functions, and if things get
inlined, around the call site as well (but not sure about the second
part).

Florian



More information about the Libc-alpha mailing list