bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] renameat: port to Solaris 10, which declares renameat in uni


From: Bruno Haible
Subject: Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h
Date: Wed, 27 Oct 2010 03:13:49 +0200
User-agent: KMail/1.9.9

Eric Blake wrote:
> We've done it for other functions, such as cygwin's symlinkat and 
> unlinkat being declared outside of <unistd.h>, so there's already 
> precedence for mandating the header namespace pollution on broken platforms.

Yes, we did this in general also for C only (no C++ support until spring 2010),
because we don't know what the system header files do:
  - They may declare the function with the same arguments, or
  - They may declare the function with different argument types
    (example: gettimeofday), or
  - They may declare the function as an inline function
    (example: lstat), or
  - They may declare the function as a macro
    (example: iswblank), or
  - They may declare the function with as asm redirection to a different symbol
    (example: fopen).

In this particular case, the Solaris 10 header declares the function with the
same arguments, AND gnulib happens to activate the replacement, so for C only,
and for this Solaris version only, Paul's workaround would have been sufficient.
It would have broken, however, as soon as the declaration in Solaris unistd.h
changes OR they fix the bug that renameat.m4 is detecting. Very fragile.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]