Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-01-07 00:59:38 +0400
committerJeff Johnston <jjohnstn@redhat.com>2014-01-07 00:59:38 +0400
commit439f4e7a8772f34adaadab19b4a6613695926c70 (patch)
treeeb3f400532c407581c1bcca620c5b3ead4346a0a /newlib/libc/include/sys/_default_fcntl.h
parent0707f1df6c6111167dd7e4b9a950545a985b0ec0 (diff)
2014-01-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/include/sys/_default_fcntl.h (AT_FDCWD): Define according to POSIX. (AT_EACCESS): Likewise. (AT_SYMLINK_NOFOLLOW): Likewise. (AT_SYMLINK_FOLLOW): Likewise. (AT_REMOVEDIR): Likewise. (openat): Declare according to POSIX. * libc/include/stdio.h (renameat): Likewise. * libc/include/sys/stat.h (fchmodat): Likewise. (fstatat): Likewise. (mkdirat): Likewise. (mkfifoat): Likewise. (mknodat): Likewise. (utimensat): Likewise. (futimens): Likewise. * libc/include/sys/unistd.h (faccessat): Likewise. (fchownat): Likewise. (linkat): Likewise. (readlinkat): Likewise. (symlinkat): Likewise. (unlinkat): Likewise.
Diffstat (limited to 'newlib/libc/include/sys/_default_fcntl.h')
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index 1884136cd..40d8fae17 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -5,6 +5,7 @@ extern "C" {
#endif
#define _SYS__DEFAULT_FCNTL_H_
#include <_ansi.h>
+#include <sys/cdefs.h>
#define _FOPEN (-1) /* from sys/file.h, kernel use only */
#define _FREAD 0x0001 /* read enabled */
#define _FWRITE 0x0002 /* write enabled */
@@ -136,7 +137,7 @@ extern "C" {
#define F_UNLKSYS 4 /* remove remote locks for a given system */
#endif /* !_POSIX_SOURCE */
-#ifdef __CYGWIN__
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__)
/* Special descriptor value to denote the cwd in calls to openat(2) etc. */
#define AT_FDCWD -2
@@ -180,12 +181,14 @@ struct eflock {
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
extern int open _PARAMS ((const char *, int, ...));
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || defined(__CYGWIN__)
+extern int openat _PARAMS ((int, const char *, int, ...));
+#endif
extern int creat _PARAMS ((const char *, mode_t));
extern int fcntl _PARAMS ((int, int, ...));
#ifdef __CYGWIN__
#include <sys/time.h>
extern int futimesat _PARAMS ((int, const char *, const struct timeval *));
-extern int openat _PARAMS ((int, const char *, int, ...));
#endif
/* Provide _<systemcall> prototypes for functions provided by some versions