This is the mail archive of the cygwin-patches mailing list for the Cygwin 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: renameat2

On 8/19/2017 12:37 PM, Corinna Vinschen wrote:
> Oh, one more thing.  This is a question to Yaakov, too.
> diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
> index 5d8cb1092..331a1cf07 100644
> --- a/newlib/libc/include/stdio.h
> +++ b/newlib/libc/include/stdio.h
> @@ -384,6 +384,9 @@ int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST)
>   #endif
>   int    _EXFUN(renameat, (int, const char *, int, const char *));
> +# ifdef __CYGWIN__
> +int    _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int));
> +# endif
>   #endif
> Does it makes sense to guard the renameat2 prototype more extensively
> to cater for standards junkies?  __MISC_VISIBLE, perhaps?

I'll defer to Yaakov.  But here's a related question.  Is renameat
currently guarded properly?  The Linux man page says:

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

           Since glibc 2.10:
               _POSIX_C_SOURCE >= 200809L
           Before glibc 2.10:

This suggests that we should do something like the following:

diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index 331a1cf07..9eb0964f2 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -381,8 +381,6 @@ FILE *      _EXFUN(open_memstream, (char **, size_t *));
 int    _EXFUN(vdprintf, (int, const char *__restrict, __VALIST)
                _ATTRIBUTE ((__format__ (__printf__, 2, 0))));
 # endif
 int    _EXFUN(renameat, (int, const char *, int, const char *));
 # ifdef __CYGWIN__
 int    _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int));


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