aboutsummaryrefslogtreecommitdiff
path: root/ctr-libc/src/functions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ctr-libc/src/functions.rs')
-rw-r--r--ctr-libc/src/functions.rs39
1 files changed, 39 insertions, 0 deletions
diff --git a/ctr-libc/src/functions.rs b/ctr-libc/src/functions.rs
new file mode 100644
index 0000000..a0d21ac
--- /dev/null
+++ b/ctr-libc/src/functions.rs
@@ -0,0 +1,39 @@
+extern "C" {
+ pub fn abort() -> !;
+ pub fn chdir(dir: *const ::c_char) -> ::c_int;
+ pub fn chmod(path: *const ::c_char, mode: ::mode_t) -> ::c_int;
+ pub fn close(fd: ::c_int) -> ::c_int;
+ pub fn closedir(dirp: *mut ::DIR) -> ::c_int;
+ pub fn exit(status: ::c_int) -> !;
+ pub fn fchmod(fd: ::c_int, mode: ::mode_t) -> ::c_int;
+ pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
+ pub fn fdatasync(fd: ::c_int) -> ::c_int;
+ pub fn free(p: *mut ::c_void);
+ pub fn fstat(fildes: ::c_int, buf: *mut ::stat) -> ::c_int;
+ pub fn ftruncate(fd: ::c_int, length: ::off_t) -> ::c_int;
+ pub fn fsync(fd: ::c_int) -> ::c_int;
+ pub fn getcwd(buf: *mut ::c_char, size: ::size_t) -> *mut ::c_char;
+ pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
+ pub fn link(src: *const ::c_char, dst: *const ::c_char) -> ::c_int;
+ pub fn lstat(path: *const ::c_char, buf: *mut ::stat) -> ::c_int;
+ pub fn lseek(fd: ::c_int, offset: ::off_t, whence: ::c_int) -> ::off_t;
+ pub fn memchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
+ pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
+ pub fn mkdir(path: *const ::c_char, mode: ::mode_t) -> ::c_int;
+ pub fn open(path: *const ::c_char, oflag: ::c_int, ...) -> ::c_int;
+ pub fn opendir(dirname: *const ::c_char) -> *mut ::DIR;
+ pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: ::off_t) -> ::ssize_t;
+ pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: ::off_t) -> ::ssize_t;
+ pub fn read(fd: ::c_int, puf: *mut ::c_void, count: ::size_t) -> ::ssize_t;
+ pub fn readlink(path: *const ::c_char, buf: *mut ::c_char, bufsz: ::size_t) -> ::ssize_t;
+ pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) -> ::c_int;
+ pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char;
+ pub fn rename(oldname: *const ::c_char, newname: *const ::c_char) -> ::c_int;
+ pub fn rmdir(path: *const ::c_char) -> ::c_int;
+ pub fn signal(signum: ::c_int, handler: ::sighandler_t) -> ::sighandler_t;
+ pub fn stat(path: *const ::c_char, buf: *mut ::stat) -> ::c_int;
+ pub fn strlen(cs: *const ::c_char) -> ::size_t;
+ pub fn symlink(path1: *const ::c_char, path2: *const ::c_char) -> ::c_int;
+ pub fn unlink(c: *const ::c_char) -> ::c_int;
+ pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t;
+}