This is the mail archive of the libc-hacker@sourceware.cygnus.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: __* in installed headers


Ulrich Drepper <drepper@cygnus.com> writes:

|> Zack Weinberg <zack@rabi.phys.columbia.edu> writes:
|> 
|> > I agree with the idea but I don't like your proposed implementation.  It
|> > seems to me it would cause maintenance headaches; we'd need to keep
|> > prototypes in sync between different headers in different directories.  A
|> > tidier way to do it would be to change the wrapper headers in include/ so
|> > they #define the external names to the internal ones before including the
|> > public headers.
|> 
|> Why do you think this is cleaner and how should this work?  Take
|> unistd.h where we have to declare write, __write, __libc_write.  You
|> want to define
|> 
|> 	#define write(fd, buf, n) __libc_write (fd, buf, n)

Why do you want to define write to __libc_write?  The latter should never
be used in libc except inside libpthread, where we can easily make it a
special case (there are not too many __libc_* functions).  What's wrong
with defining write to __write?  Current <unistd.h> doesn't prototype
__libc_write anyway.

|> But this leaves __write and write without prototypes and at least
|> __write is used internally.

We don't want to use write anywhere in libc, so a missing prototype is not
a problem.

Andreas.


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