https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62215

--- Comment #6 from Janne Blomqvist <jb at gcc dot gnu.org> ---
(In reply to Steve Kargl from comment #3)
> Not having a copyright assignment won't interfere with this
> patch being applied.  I'm waiting for confirmation from Janne
> that I can revert the changes in his previous patch.

I don't remember, but I guess I read the description from the POSIX standard
and assumed non-POSIX systems would behave the same way. But now that I look at
C11 (n1570.pdf) it says that if *new exists the behavior is
implementation-defined.

So please go ahead and commit the patch to trunk and 4.9. 

As for the #ifdef stuff, instead of trying to enumerate all non-POSIX systems
one could go the other way instead, e.g. something like

#if not defined(__unix__) || not defined(_POSIX_VERSION)
... unlink stuff
#endif

(See http://sourceforge.net/p/predef/wiki/Home/ for lists of various
pre-defined macros)

That would save an extra syscall on POSIX systems, but I don't think it really
matters, so do as you see fit.

Reply via email to