From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

add openat64() and creat64() functions

Add functions openat64() and creat64() as aliases to the usual functions.

Refs #747.

Signed-off-by: Nadav Har'El <n...@scylladb.com>
Message-Id: <20170712062906.2401-1-...@scylladb.com>

---
diff --git a/fs/vfs/main.cc b/fs/vfs/main.cc
--- a/fs/vfs/main.cc
+++ b/fs/vfs/main.cc
@@ -197,6 +197,7 @@ int openat(int dirfd, const char *pathname, int flags, ...)

     return error;
 }
+LFS64(openat);

 // open() has an optional third argument, "mode", which is only needed in
 // some cases (when the O_CREAT mode is used). As a safety feature, recent
@@ -222,6 +223,7 @@ int creat(const char *pathname, mode_t mode)
 {
     return open(pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
 }
+LFS64(creat);

 TRACEPOINT(trace_vfs_close, "%d", int);
 TRACEPOINT(trace_vfs_close_ret, "");
diff --git a/include/api/fcntl.h b/include/api/fcntl.h
--- a/include/api/fcntl.h
+++ b/include/api/fcntl.h
@@ -159,9 +159,6 @@ ssize_t tee(int, int, size_t, unsigned);
 #endif

 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
-//#define open64 open
-#define openat64 openat
-#define creat64 creat
 #define off64_t off_t
 #endif

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to