lib: graph: add "self" and some "private" APIs
[babeltrace.git] / include / babeltrace / compat / fcntl-internal.h
index 2040bec0e84b5d4fc049ba57e2035960150b8ccc..c5289430106f2d2df10c898e357a42020239209f 100644 (file)
@@ -2,8 +2,6 @@
 #define _BABELTRACE_COMPAT_FCNTL_H
 
 /*
- * babeltrace/compat/fcntl.h
- *
  * Copyright 2015 (c) - Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * fcntl compatibility layer.
@@ -232,44 +230,4 @@ end:
 }
 #endif /* #else #ifdef BABELTRACE_HAVE_POSIX_FALLOCATE */
 
-
-#ifdef BABELTRACE_HAVE_FACCESSAT
-
-#include <fcntl.h>
-#include <unistd.h>
-
-static inline
-int bt_faccessat(int dirfd, const char *dirname,
-               const char *pathname, int mode, int flags)
-{
-       return faccessat(dirfd, pathname, mode, flags);
-}
-
-#else /* #ifdef BABELTRACE_HAVE_FACCESSAT */
-
-#include <string.h>
-#include <unistd.h>
-
-static inline
-int bt_faccessat(int dirfd, const char *dirname,
-               const char *pathname, int mode, int flags)
-{
-       char cpath[PATH_MAX];
-
-       if (flags != 0) {
-               errno = EINVAL;
-               return -1;
-       }
-       /* Includes middle / and final \0. */
-       if (strlen(dirname) + strlen(pathname) + 2 > PATH_MAX) {
-               return -1;
-       }
-       strcpy(cpath, dirname);
-       strcat(cpath, "/");
-       strcat(cpath, pathname);
-       return access(cpath, mode);
-}
-
-#endif /* #else #ifdef BABELTRACE_HAVE_FACCESSAT */
-
 #endif /* _BABELTRACE_COMPAT_FCNTL_H */
This page took 0.023683 seconds and 4 git commands to generate.