sysconst.inc 3.1 KB

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