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

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

unix.superglobalmegacorp.com

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