• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GD_C_unistd.h
Go to the documentation of this file.
1 /*
2  * (c) 2016 Good Technology Corporation. All rights reserved.
3  */
4 
5 #pragma once
6 
7 #include <unistd.h>
8 #include <sys/mount.h>
9 #include <sys/uio.h>
10 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #ifndef GD_C_API
20 # if !defined(_WIN32)
21 # define GD_C_API __attribute__((visibility("default")))
22 # else
23 # define GD_C_API
24 # endif
25 #endif
26 
27 
30  GD_C_API int GD_UNISTD_open(const char* path, int flags, ...);
31 
34  GD_C_API int GD_UNISTD_close(int fd);
35 
38  GD_C_API ssize_t GD_UNISTD_read(int fd, void *buffer, size_t nbytes);
39 
42  GD_C_API ssize_t GD_UNISTD_write(int fd, const void *buffer, size_t nbytes);
43 
46  GD_C_API off_t GD_UNISTD_lseek(int fd, off_t offset, int whence);
47 
50  GD_C_API int GD_UNISTD_ftruncate(int fd, off_t length);
51 
54  GD_C_API int GD_UNISTD_truncate(const char* path, off_t length);
55 
58  GD_C_API int GD_UNISTD_fdatasync(int fd);
59 
62  GD_C_API int GD_UNISTD_fsync(int fd);
63 
66  GD_C_API int GD_UNISTD_fchown(int fd, uid_t owner, gid_t group);
67 
70  GD_C_API int GD_UNISTD_chown(const char* path, uid_t owner, gid_t group);
71 
74  GD_C_API int GD_UNISTD_lchown(const char* path, uid_t owner, gid_t group);
75 
78  GD_C_API int GD_UNISTD_chroot(const char* path);
79 
82  GD_C_API int GD_UNISTD_fchdir(int fd);
83 
86  GD_C_API int GD_UNISTD_chdir(const char* path);
87 
90  GD_C_API char* GD_UNISTD_getcwd(char *buf, size_t size);
91 
94  GD_C_API int GD_UNISTD_rmdir(const char* path);
95 
98  GD_C_API int GD_UNISTD_access(const char* path, int mode);
99 
102  GD_C_API long int GD_UNISTD_fpathconf(int fd, int name);
103 
106  GD_C_API long int GD_UNISTD_pathconf(const char* path, int name);
107 
110  GD_C_API int GD_UNISTD_lockf(int fd, int function, off_t size);
111 
114  GD_C_API char* GD_UNISTD_ttyname(int fd);
115 
118  GD_C_API int GD_UNISTD_ttyname_r(int fd, char* name, size_t namesize);
119 
122  GD_C_API int GD_UNISTD_pipe(int fds[2]);
123 
126  GD_C_API ssize_t GD_UNISTD_pread(int fd, void* buffer, size_t nbyte, off_t offset);
127 
130  GD_C_API ssize_t GD_UNISTD_pwrite(int fd, const void *buffer, size_t nbyte, off_t offset);
131 
134  GD_C_API ssize_t GD_UNISTD_writev(int fd, const struct iovec* iov, int iovcnt);
135 
138  GD_C_API ssize_t GD_UNISTD_readv(int fd, const struct iovec* iov, int iovcnt);
139 
142  GD_C_API int GD_UNISTD_dup(int oldd);
143 
146  GD_C_API int GD_UNISTD_dup2(int oldd, int newd);
147 
150  GD_C_API int GD_UNISTD_symlink(const char* file_path, const char* symlink_path);
151 
154  GD_C_API int GD_UNISTD_readlink(const char* path, char* buffer, size_t nbyte);
155 
158  GD_C_API int GD_UNISTD_link(const char* file_path, const char* link_path);
159 
162  GD_C_API int GD_UNISTD_unlink(const char* path);
163 
166  GD_C_API void* GD_UNISTD_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
167 
170  GD_C_API int GD_UNISTD_munmap(void *addr, size_t length);
171 
174  GD_C_API int GD_UNISTD_msync(void *addr, size_t length, int flags);
175 
178  GD_C_API int GD_UNISTD_fchmod(int fildes, mode_t mode);
179 
182  GD_C_API int GD_UNISTD_fstatfs(int fd, struct statfs *buf);
183 
186  GD_C_API int GD_UNISTD_utimes(int fd, const struct utimbuf *times);
187 
188 #ifdef __cplusplus
189 }
190 #endif
191 
GD_UNISTD_link
int GD_UNISTD_link(const char *file_path, const char *link_path)
C API.
GD_UNISTD_chown
int GD_UNISTD_chown(const char *path, uid_t owner, gid_t group)
C API.
GD_UNISTD_lockf
int GD_UNISTD_lockf(int fd, int function, off_t size)
C API.
GD_UNISTD_getcwd
char * GD_UNISTD_getcwd(char *buf, size_t size)
C API.
GD_UNISTD_fsync
int GD_UNISTD_fsync(int fd)
C API.
GD_UNISTD_dup2
int GD_UNISTD_dup2(int oldd, int newd)
C API.
GD_UNISTD_readlink
int GD_UNISTD_readlink(const char *path, char *buffer, size_t nbyte)
C API.
GD_UNISTD_rmdir
int GD_UNISTD_rmdir(const char *path)
C API.
GD_UNISTD_pread
ssize_t GD_UNISTD_pread(int fd, void *buffer, size_t nbyte, off_t offset)
C API.
GD_UNISTD_ttyname_r
int GD_UNISTD_ttyname_r(int fd, char *name, size_t namesize)
C API.
GD_UNISTD_utimes
int GD_UNISTD_utimes(int fd, const struct utimbuf *times)
GD_UNISTD_lchown
int GD_UNISTD_lchown(const char *path, uid_t owner, gid_t group)
C API.
GD_UNISTD_chdir
int GD_UNISTD_chdir(const char *path)
C API.
GD_UNISTD_pipe
int GD_UNISTD_pipe(int fds[2])
C API.
GD_UNISTD_fchdir
int GD_UNISTD_fchdir(int fd)
C API.
GD_UNISTD_fpathconf
long int GD_UNISTD_fpathconf(int fd, int name)
C API.
GD_UNISTD_readv
ssize_t GD_UNISTD_readv(int fd, const struct iovec *iov, int iovcnt)
C API.
GD_UNISTD_pathconf
long int GD_UNISTD_pathconf(const char *path, int name)
C API.
GD_UNISTD_ttyname
char * GD_UNISTD_ttyname(int fd)
C API.
GD_UNISTD_fchmod
int GD_UNISTD_fchmod(int fildes, mode_t mode)
C API.
GD_UNISTD_lseek
off_t GD_UNISTD_lseek(int fd, off_t offset, int whence)
C API.
GD_UNISTD_write
ssize_t GD_UNISTD_write(int fd, const void *buffer, size_t nbytes)
C API.
GD_UNISTD_read
ssize_t GD_UNISTD_read(int fd, void *buffer, size_t nbytes)
C API.
GD_UNISTD_fchown
int GD_UNISTD_fchown(int fd, uid_t owner, gid_t group)
C API.
GD_UNISTD_fdatasync
int GD_UNISTD_fdatasync(int fd)
C API.
GD_UNISTD_msync
int GD_UNISTD_msync(void *addr, size_t length, int flags)
C API.
GD_UNISTD_chroot
int GD_UNISTD_chroot(const char *path)
C API.
GD_UNISTD_mmap
void * GD_UNISTD_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
C API.
GD_UNISTD_truncate
int GD_UNISTD_truncate(const char *path, off_t length)
C API.
GD_UNISTD_munmap
int GD_UNISTD_munmap(void *addr, size_t length)
C API.
GD_UNISTD_pwrite
ssize_t GD_UNISTD_pwrite(int fd, const void *buffer, size_t nbyte, off_t offset)
C API.
GD_UNISTD_symlink
int GD_UNISTD_symlink(const char *file_path, const char *symlink_path)
C API.
GD_UNISTD_writev
ssize_t GD_UNISTD_writev(int fd, const struct iovec *iov, int iovcnt)
C API.
GD_UNISTD_open
int GD_UNISTD_open(const char *path, int flags,...)
C API.
GD_UNISTD_fstatfs
int GD_UNISTD_fstatfs(int fd, struct statfs *buf)
C API.
GD_UNISTD_unlink
int GD_UNISTD_unlink(const char *path)
C API.
GD_UNISTD_close
int GD_UNISTD_close(int fd)
C API.
GD_UNISTD_dup
int GD_UNISTD_dup(int oldd)
C API.
GD_UNISTD_ftruncate
int GD_UNISTD_ftruncate(int fd, off_t length)
C API.
GD_UNISTD_access
int GD_UNISTD_access(const char *path, int mode)
C API.