summaryrefslogtreecommitdiff
path: root/source3/smbwrapper/realcalls.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-02 12:37:31 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-02 12:37:31 +0000
commit24bf006d5224e59d2d073ca4a7cb2df838c4c6c7 (patch)
tree67360075f9d28f60661056afb9b5a335c5b7b86b /source3/smbwrapper/realcalls.h
parent019c8d2fdda74dc03d9089eacfbd2b77e1056169 (diff)
downloadsamba-24bf006d5224e59d2d073ca4a7cb2df838c4c6c7.tar.gz
samba-24bf006d5224e59d2d073ca4a7cb2df838c4c6c7.tar.bz2
samba-24bf006d5224e59d2d073ca4a7cb2df838c4c6c7.zip
the guts of the smbwrapper code. I may change the layout of this at
some stage. (This used to be commit 3f34a3cac817de19d227c36bc792db8b2c3798f9)
Diffstat (limited to 'source3/smbwrapper/realcalls.h')
-rw-r--r--source3/smbwrapper/realcalls.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/smbwrapper/realcalls.h b/source3/smbwrapper/realcalls.h
new file mode 100644
index 0000000000..de9945f733
--- /dev/null
+++ b/source3/smbwrapper/realcalls.h
@@ -0,0 +1,44 @@
+#ifdef aix
+
+#include "aix-syscall.h"
+
+#else
+
+#define real_access(fn, mode) (syscall(SYS_access, (fn), (mode)))
+#define real_chdir(fn) (syscall(SYS_chdir, (fn)))
+#define real_chmod(fn, mode) (syscall(SYS_chmod,(fn), (mode)))
+#define real_chown(fn, owner, group) (syscall(SYS_chown,(fn),(owner),(group)))
+
+#define real_getdents(fd, dirp, count) (syscall(SYS_getdents, (fd), (dirp), (count)))
+/* if needed define SYS_getdents so that getdents gets compiled */
+
+#define real_link(fn1, fn2) (syscall(SYS_link, (fn1), (fn2)))
+
+#define real_lstat(fn, buf ) (syscall(SYS_lstat, (fn), (buf)))
+#define real_open(fn,flags,mode) (syscall(SYS_open, (fn), (flags), (mode)))
+#define real_prev_lstat(fn, buf ) (syscall(SYS_prev_lstat, (fn), (buf)))
+#define real_prev_stat(fn, buf ) (syscall(SYS_prev_stat, (fn), (buf)))
+
+#ifdef linux
+struct dirent *__libc_readdir(DIR * dir);
+#define real_readdir(dir) (__libc_readdir(dirp))
+#else
+#define real_readdir(dirp) ((struct dirent *)syscall(SYS_readdir,(dirp)))
+/* if needed define SYS_readdir so that readdir gets compiled */
+#endif
+
+#define real_readlink(fn,buf,len) (syscall(SYS_readlink, (fn), (buf), (len)))
+#define real_rename(fn1, fn2) (syscall(SYS_rename, (fn1), (fn2)))
+#define real_stat(fn, buf ) (syscall(SYS_stat, (fn), (buf)))
+#define real_fstat(fd, buf ) (syscall(SYS_fstat, (fd), (buf)))
+#define real_read(fd, buf, count ) (syscall(SYS_read, (fd), (buf), (count)))
+#define real_write(fd, buf, count ) (syscall(SYS_write, (fd), (buf), (count)))
+#define real_close(fd) (syscall(SYS_close, (fd)))
+#define real_fcntl(fd,cmd,arg) (syscall(SYS_fcntl, (fd), (cmd), (arg)))
+#define real_symlink(fn1, fn2) (syscall(SYS_symlink, (fn1), (fn2)))
+#define real_unlink(fn) (syscall(SYS_unlink, (fn)))
+#define real_utime(fn, buf) (syscall(SYS_utime, (fn), (buf)))
+#define real_utimes(fn, buf) (syscall(SYS_utimes, (fn), (buf)))
+
+#endif
+