Annotation of mstools/posix/h/fcntl.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1989  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:    fcntl.h
                      8: 
                      9: Abstract:
                     10: 
                     11:    This module contains the required contents of fcntl
                     12: 
                     13: Author:
                     14: 
                     15:    Mark Lucovsky (markl) 17-Oct-1989
                     16: 
                     17: Revision History:
                     18: 
                     19: --*/
                     20: 
                     21: #ifndef _FCNTL_
                     22: #define _FCNTL_
                     23: 
                     24: #include <sys/types.h>
                     25: 
                     26: #define O_RDONLY    0x00000000
                     27: #define O_WRONLY    0x00000001
                     28: #define O_RDWR      0x00000002
                     29: 
                     30: #define O_ACCMODE   0x00000007
                     31: 
                     32: #define O_APPEND    0x00000008
                     33: #define O_CREAT     0x00000100
                     34: #define O_TRUNC     0x00000200
                     35: #define O_EXCL      0x00000400
                     36: #define O_NOCTTY    0x00000800
                     37: 
                     38: #define O_NONBLOCK  0x00001000
                     39: 
                     40: /*
                     41:  * Control operations on files, 1003.1-88 (6.5.2.2).  Use as 'command'
                     42:  * argument to fcntl().
                     43:  */
                     44: 
                     45: #define F_DUPFD                0
                     46: #define F_GETFD                1
                     47: #define F_GETLK                2
                     48: #define F_SETFD                3
                     49: #define F_GETFL                4
                     50: #define F_SETFL                5
                     51: #define F_SETLK                6
                     52: #define F_SETLKW       7
                     53: 
                     54: /*
                     55:  * File descriptor flags, 1003.1-90 (6-2).  Used as argument to F_SETFD
                     56:  * command.
                     57:  */
                     58: 
                     59: #define FD_CLOEXEC     0x1
                     60: 
                     61: struct flock {
                     62:        short l_type;           /* F_RDLCK, F_WRLCK, or F_UNLCK         */
                     63:        short l_whence;         /* flag for starting offset             */
                     64:        off_t l_start;          /* relative offset in bytes             */
                     65:        off_t l_len;            /* size; if 0 then until EOF            */
                     66:        pid_t l_pid;            /* pid of process holding the lock      */
                     67: };
                     68: 
                     69: /*
                     70:  * Values for the l_type field.
                     71:  */
                     72: 
                     73: #define F_RDLCK        1
                     74: #define F_UNLCK 2
                     75: #define F_WRLCK 3
                     76: 
                     77: int _CRTAPI2 open(const char *, int,...);
                     78: int _CRTAPI1 creat(const char *, mode_t);
                     79: int _CRTAPI2 fcntl(int, int, ...);
                     80: 
                     81: #endif /* _FCNTL_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.