This is the mail archive of the mailing list for the newlib 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: [patch/ob] openat and friends for Cygwin

Hash: SHA1

According to Corinna Vinschen on 4/23/2008 5:13 AM:
| +#ifdef __CYGWIN__
| +/* Special descriptor value to denote the cwd in calls to openat(2) etc. */
| +#define AT_FDCWD -2

Is it worth trying to match Linux's definition of AT_FDCWD (-100, per, if only for the benefit of (broken)
code that doesn't use the symbolic name?

| +
| +/* Flag values for faccessat2) et al. */
| +#define AT_EACCESS              1
| +#define AT_SYMLINK_NOFOLLOW     2
| +#define AT_SYMLINK_FOLLOW       4

Posix allows AT_SYMLINK_NOFOLLOW and AT_SYMLINK_FOLLOW to have the same
value, since the set of Posix *at() functions that require either flag are
mutually exclusive (ie. no single *at() function supports both flags).
But I'm okay with leaving them distinct, in case we come up with an
extension beyond what Posix requires where having them be distinct allows
them to both be useful to a single *at() function.

| +#ifdef __CYGWIN__
| +extern int futimesat _PARAMS ((int, const char *, const struct timeval *));

Shouldn't you also declare utimensat in sys/stat.h?  Posix 200x scrapped
futimesat in favor of utimensat, in part because nanosecond resolution is
too important to overlook, and in part, to add a flag parameter so you can
adjust timestamps of symlinks independently of what they point to on file
systems that support that.

- --
Don't work too hard, make some time for fun as well!

Eric Blake   
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


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