X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibposix.so_src%2Finclude_exp%2Ffcntl.h;h=bdb5422641ae72b56d7489db283d86f4710acb8e;hb=8695e2b9f65ab4411677d4eff57d0d80f6c26f9a;hp=5fee9a11e0168ac7cc0ec3f45a79a72e9f349b5a;hpb=4bd23d4ae51bd5cb92b449bcd66e0d2de88c7fc9;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h b/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h index 5fee9a11..bdb54226 100644 --- a/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h +++ b/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h @@ -9,18 +9,30 @@ #ifndef _FCNTL_H_ #define _FCNTL_H_ -#include - -// Hacks to handle different behaviors in Acess - -// Open doesn't take a chmod -#define open(_1,_2,...) open(_1, _2) - -// Close returns void -#define close(_1) (close(_1),0) - -// Acess doesn't implement lseek -#define lseek(_1,_2,_3) (seek(_1,_2,_3),tell(_1)) +struct flock +{ + short l_type; + short l_whece; + off_t l_start; + off_t l_len; + pid_t l_pid; +}; + +enum e_fcntl_cmds +{ + F_DUPFD, // (long) + //F_DUPFD_CLOEXEC, // (long) - Non POSIX + F_GETFD, // (void) + F_SETFD, // (long) + F_GETFL, // (void) + F_SETFL, // (long) + + F_SETLK, // (struct flock *) + F_SETLKW, // (struct flock *) + F_GETLK, // (struct flock *) +}; + +static inline int fcntl(int fd __attribute__((unused)), int cmd __attribute__((unused)), ...) { return -1; } #endif