"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.05.0-linux-x86_64/include/freebasic/crt/dos/fcntl.bi" (31 Jan 2016, 2961 Bytes) of package /linux/privat/FreeBASIC-1.05.0-linux-x86_64.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ''
    2 ''
    3 '' fcntl -- header translated with help of SWIG FB wrapper
    4 ''
    5 '' NOTICE: This file is part of the FreeBASIC Compiler package and can't
    6 ''         be included in other distributions without authorization.
    7 ''
    8 ''
    9 #ifndef __crt_dos_fcntl_bi__
   10 #define __crt_dos_fcntl_bi__
   11 
   12 #define FD_CLOEXEC &h0001
   13 #define F_DUPFD 1
   14 #define F_GETFD 2
   15 #define F_GETFL 3
   16 #define F_GETLK 4
   17 #define F_SETFD 5
   18 #define F_SETFL 6
   19 #define F_SETLK 7
   20 #define F_SETLKW 8
   21 #define F_UNLCK 0
   22 #define F_RDLCK 1
   23 #define F_WRLCK 2
   24 #define O_RDONLY &h0000
   25 #define O_WRONLY &h0001
   26 #define O_RDWR &h0002
   27 #define O_ACCMODE &h0003
   28 #define O_BINARY &h0004
   29 #define O_TEXT &h0008
   30 #define O_NOINHERIT &h0080
   31 #define O_CREAT &h0100
   32 #define O_EXCL &h0200
   33 #define O_NOCTTY &h0400
   34 #define O_TRUNC &h0800
   35 #define O_APPEND &h1000
   36 #define O_NONBLOCK &h2000
   37 
   38 #include once "crt/sys/dos/types.bi"
   39 
   40 type flock
   41     l_len as off_t
   42     l_pid as pid_t
   43     l_start as off_t
   44     l_type as short
   45     l_whence as short
   46 end type
   47 
   48 extern _fmode alias "_fmode" as integer
   49 
   50 declare function open_ cdecl alias "open" (byval _path as zstring ptr, byval _oflag as integer, ...) as integer
   51 declare function creat cdecl alias "creat" (byval _path as zstring ptr, byval _mode as mode_t) as integer
   52 declare function fcntl cdecl alias "fcntl" (byval _fildes as integer, byval _cmd as integer, ...) as integer
   53 
   54 #define SH_COMPAT &h0000
   55 #define SH_DENYRW &h0010
   56 #define SH_DENYWR &h0020
   57 #define SH_DENYRD &h0030
   58 #define SH_DENYNO &h0040
   59 #define _SH_COMPAT SH_COMPAT
   60 #define _SH_DENYRW SH_DENYRW
   61 #define _SH_DENYWR SH_DENYWR
   62 #define _SH_DENYRD SH_DENYRD
   63 #define _SH_DENYNO SH_DENYNO
   64 
   65 extern __djgpp_share_flags alias "__djgpp_share_flags" as integer
   66 
   67 #define S_IREAD S_IRUSR
   68 #define S_IWRITE S_IWUSR
   69 #define S_IEXEC S_IXUSR
   70 #define _O_RDONLY O_RDONLY
   71 #define _O_WRONLY O_WRONLY
   72 #define _O_RDWR O_RDWR
   73 #define _O_APPEND O_APPEND
   74 #define _O_CREAT O_CREAT
   75 #define _O_TRUNC O_TRUNC
   76 #define _O_EXCL O_EXCL
   77 #define _O_TEXT O_TEXT
   78 #define _O_BINARY O_BINARY
   79 #define _O_NOINHERIT O_NOINHERIT
   80 #define _FILESYS_UNKNOWN &h80000000U
   81 #define _FILESYS_CASE_SENSITIVE &h0001
   82 #define _FILESYS_CASE_PRESERVED &h0002
   83 #define _FILESYS_UNICODE &h0004
   84 #define _FILESYS_LFN_SUPPORTED &h4000
   85 #define _FILESYS_VOL_COMPRESSED &h8000
   86 
   87 declare function _get_volume_info cdecl alias "_get_volume_info" (byval _path as zstring ptr, byval _max_file_len as integer ptr, byval _max_path_len as integer ptr, byval _filesystype as zstring ptr) as uinteger
   88 declare function _use_lfn_ cdecl alias "_use_lfn" (byval _path as zstring ptr) as byte
   89 declare function _lfn_gen_short_fname cdecl alias "_lfn_gen_short_fname" (byval _long_fname as zstring ptr, byval _short_fname as zstring ptr) as zstring ptr
   90 
   91 #define _LFN_CTIME 1
   92 #define _LFN_ATIME 2
   93 
   94 declare function _lfn_get_ftime cdecl alias "_lfn_get_ftime" (byval _handle as integer, byval _which as integer) as uinteger
   95 declare function _preserve_fncase cdecl alias "_preserve_fncase" () as byte
   96 #define _USE_LFN _use_lfn_(0)
   97 
   98 #endif