1{
2    This file is part of the Free Pascal run time library.
3    Copyright (c) 1999-2000 by Michael Van Canneyt,
4    member of the Free Pascal development team.
5
6    Constants for Unix unit.
7
8    See the file COPYING.FPC, included in this distribution,
9    for details about the copyright.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15 **********************************************************************}
16
17
18const
19  { Things for LSEEK call}
20  Seek_set = 0;
21  Seek_Cur = 1;
22  Seek_End = 2;
23
24  { The waitpid uses the following options:}
25  Wait_NoHang   = 1;
26  Wait_UnTraced = 2;
27  Wait_Any      = -1;
28  Wait_MyPGRP   = 0;
29
30
31  { Constants to check stat.mode -  checked all STAT constants with BSD}
32  STAT_IFMT   = $f000; {00170000 }
33  STAT_IFSOCK = $c000; {0140000 }
34  STAT_IFLNK  = $a000; {0120000 }
35  STAT_IFREG  = $8000; {0100000 }
36  STAT_IFBLK  = $6000; {0060000 }
37  STAT_IFDIR  = $4000; {0040000 }
38  STAT_IFCHR  = $2000; {0020000 }
39  STAT_IFIFO  = $1000; {0010000 }
40  STAT_ISUID  = $0800; {0004000 }
41  STAT_ISGID  = $0400; {0002000 }
42  STAT_ISVTX  = $0200; {0001000}
43  { Constants to check permissions all }
44  STAT_IRWXO = $7;
45  STAT_IROTH = $4;
46  STAT_IWOTH = $2;
47  STAT_IXOTH = $1;
48
49  STAT_IRWXG = STAT_IRWXO shl 3;
50  STAT_IRGRP = STAT_IROTH shl 3;
51  STAT_IWGRP = STAT_IWOTH shl 3;
52  STAT_IXGRP = STAT_IXOTH shl 3;
53
54  STAT_IRWXU = STAT_IRWXO shl 6;
55  STAT_IRUSR = STAT_IROTH shl 6;
56  STAT_IWUSR = STAT_IWOTH shl 6;
57  STAT_IXUSR = STAT_IXOTH shl 6;
58
59  { Constants to test the type of filesystem }
60  fs_old_ext2 = $ef51;
61  fs_ext2     = $ef53;
62  fs_ext      = $137d;
63  fs_iso      = $9660;
64  fs_minix    = $137f;
65  fs_minix_30 = $138f;
66  fs_minux_V2 = $2468;
67  fs_msdos    = $4d44;
68  fs_nfs      = $6969;
69  fs_proc     = $9fa0;
70  fs_xia      = $012FD16D;
71
72  {Constansts Termios/Ioctl (used in Do_IsDevice) }
73  IOCtl_TCGETS= $40000000+$2C7400+ 19; // TCGETS is also in termios.inc, but the sysunix needs only this
74
75  ITimer_Real    =0;
76  ITimer_Virtual =1;
77  ITimer_Prof    =2;
78
79{
80  {Checked for BSD using Linuxthreads port}
81  { cloning flags }
82  CSIGNAL       = $000000ff; // signal mask to be sent at exit
83  CLONE_VM      = $00000100; // set if VM shared between processes
84  CLONE_FS      = $00000200; // set if fs info shared between processes
85  CLONE_FILES   = $00000400; // set if open files shared between processes
86  CLONE_SIGHAND = $00000800; // set if signal handlers shared
87  CLONE_PID     = $00001000; // set if pid shared
88
89type
90 TCloneFunc=function(args:pointer):longint;cdecl;
91}
92