This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

Re: Avoid local PLT for dirfd


Hi!

On Tue, 28 Feb 2012 13:59:34 +0000 (UTC), "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> On Tue, 28 Feb 2012, Jakub Jelinek wrote:
> 
> > I'd say you should not introduce __dirfd, but instead just
> > add libc_hidden_proto (dirfd) (in include/dirent.h) and
> > libc_hidden_def (dirfd) (in the dirfd.c).
> > Then you don't need to adjust any users of that function.
> 
> Or you could simply restore the old include order in include/dirent.h, so 
> that <dirstream.h> is again included before <dirent/dirent.h> and so the 
> macro version of dirfd gets used as it did until the recent header 
> changes.

I don't quite understand the purpose of this _DIR_dirfd code layout.  If
this is an optimization internal to glibc, why is it in dirent/dirent.h,
which is an installed header?  (Surely no user code is meant to #define
_DIR_dirfd.)  Why isn't this optimization done unconditionally?  (In
include/dirent.h?)  (Also, a _DIR_dirfd definition is missing for GNU
Hurd; but I didn't check yet whether it's applicable there.)


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


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