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] |
On Aug 19 13:13, Ken Brown wrote: > 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 > > #if __ATFILE_VISIBLE > > 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)): > > renameat(): > Since glibc 2.10: > _POSIX_C_SOURCE >= 200809L > Before glibc 2.10: > _ATFILE_SOURCE > > 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 > -#endif > -#if __ATFILE_VISIBLE > int _EXFUN(renameat, (int, const char *, int, const char *)); > # ifdef __CYGWIN__ > int _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int)); No, that's correct. See sys/features.h: * __ATFILE_VISIBLE * "at" functions; enabled by default, with _ATFILE_SOURCE, * _POSIX_C_SOURCE >= 200809L, or _XOPEN_SOURCE >= 700. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |