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


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)

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

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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