X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=posix%2Finclude%2Ffcntl.h;h=179f71d408e0ad7fd170920b2d80a32fd72daeaf;hp=19f97f81b910ceb18558221387042574f95a540b;hb=3b1645e839f414f1b920990f3cba01dec9cb612d;hpb=e858ec180136a0afc287589a5f811f3779fdfbb3 diff --git a/posix/include/fcntl.h b/posix/include/fcntl.h index 19f97f81b91..179f71d408e 100644 --- a/posix/include/fcntl.h +++ b/posix/include/fcntl.h @@ -1,10 +1,10 @@ -/* $Id: +/* $Id: fcntl.h,v 1.4 2002/03/22 01:26:28 hyperion Exp $ */ /* * fcntl.h * - * file control options. Based on the Single UNIX(r) Specification, - * Version 2 + * file control options. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 * * This file is part of the ReactOS Operating System. * @@ -54,10 +54,10 @@ enum __fcntl_cmd { F_DUPFD, /* duplicate file descriptor */ F_GETFD, /* get file descriptor flags */ + F_GETLK, /* get record locking information */ F_SETFD, /* set file descriptor flags */ F_GETFL, /* get file status flags and file access modes */ - F_SETFL, /* Set file status flags */ - F_GETLK, /* get record locking information */ + F_SETFL, /* set file status flags */ F_SETLK, /* set record locking information */ F_SETLKW, /* set record locking information; wait if blocked */ /* ReactOS-specific */ @@ -93,45 +93,45 @@ enum __fcntl_cmd file flags used for open() */ /* Create file if it does not exist. */ -#define O_CREAT (0x00000001) +#define O_CREAT (0x00000100) +/* Truncate flag. */ +#define O_TRUNC (0x00000200) /* Exclusive use flag. */ -#define O_EXCL (0x00000002) +#define O_EXCL (0x00000400) /* Do not assign controlling terminal. */ -#define O_NOCTTY (0x00000004) -/* Truncate flag. */ -#define O_TRUNC (0x00000008) +#define O_NOCTTY (0x00000800) /* ReactOS-specific */ /* File must be a directory */ -#define _O_DIRFILE (0x00000010) +#define _O_DIRFILE (0x00100000) /* file status flags used for open() and fcntl() */ /* Set append mode. */ -#define O_APPEND (0x00000100) -/* Write according to synchronised I/O data integrity completion. */ -#define O_DSYNC (0x00000200) +#define O_APPEND (0x00000008) /* Non-blocking mode. */ -#define O_NONBLOCK (0x00000400) +#define O_NONBLOCK (0x00001000) +/* Write according to synchronised I/O data integrity completion. */ +#define O_DSYNC (0x00002000) /* Synchronised read I/O operations. */ -#define O_RSYNC (0x00000800) +#define O_RSYNC (0x00004000) /* Write according to synchronised I/O file integrity completion. */ -#define O_SYNC (0x00001000) +#define O_SYNC (0x00008000) /* file access modes used for open() and fcntl() */ /* Open for reading only. */ -#define O_RDONLY (0x01000000) -/* Open for reading and writing. */ -#define O_RDWR (0x02000000) +#define O_RDONLY (0x00000000) /* Open for writing only. */ -#define O_WRONLY (0x04000000) +#define O_WRONLY (0x00000001) +/* Open for reading and writing. */ +#define O_RDWR (0x00000002) /* mask for use with file access modes */ -#define O_ACCMODE (O_RDONLY | O_RDWR | O_WRONLY) +#define O_ACCMODE (0x00000007) /* PROTOTYPES */ int creat(const char *, mode_t);