X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibposix.so_src%2Finclude_exp%2Ffcntl.h;h=f53ad9357fc5c489d3625e232d258a7fba270248;hb=d0f3b51e8a52fecdf28df689f3b8ae9215087dd8;hp=ded9ba1e4c84fd8b6d0213033af738b39b97030c;hpb=479d0634670b58da044bc58149662adba0ad1d0b;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 ded9ba1e..f53ad935 100644 --- a/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h +++ b/Usermode/Libraries/libposix.so_src/include_exp/fcntl.h @@ -1,33 +1,38 @@ /* - * Acess2 C Library (UNIX Emulation) + * Acess2 POSIX Emulation Library * - By John Hodge (thePowersGang) * * fcntl.h - * - ?? + * - File descriptor control? */ #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_SETFL + 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 *) }; -int fcntl(int fd, int cmd, ...) { return -1; } +extern int fcntl(int fd, int cmd, ...); #endif