sysconst.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. { For getting/setting priority }
  14. Prio_Process = 0;
  15. Prio_PGrp = 1;
  16. Prio_User = 2;
  17. { Things for LSEEK call }
  18. Seek_set = 0;
  19. Seek_Cur = 1;
  20. Seek_End = 2;
  21. { Things for OPEN call - after linux/fcntl.h }
  22. Open_Accmode = 3;
  23. Open_RdOnly = 0;
  24. Open_WrOnly = 1;
  25. Open_RdWr = 2;
  26. Open_Creat = 1 shl 6; // %100 etc
  27. Open_Excl = 2 shl 6;
  28. Open_NoCtty = 4 shl 6;
  29. Open_Trunc = 1 shl 9;
  30. Open_Append = 2 shl 9;
  31. Open_NonBlock = 4 shl 9;
  32. Open_NDelay = Open_NonBlock;
  33. Open_Sync = 1 shl 12;
  34. Open_Direct = 4 shl 12;
  35. Open_LargeFile = 1 shl 15;
  36. Open_Directory = 2 shl 15;
  37. Open_NoFollow = 4 shl 15;
  38. { The waitpid uses the following options:}
  39. Wait_NoHang = 1;
  40. Wait_UnTraced = 2;
  41. Wait_Any = -1;
  42. Wait_MyPGRP = 0;
  43. Wait_Clone = $80000000;
  44. { Constants to check stat.mode }
  45. STAT_IFMT = $f000; {00170000}
  46. STAT_IFSOCK = $c000; {0140000}
  47. STAT_IFLNK = $a000; {0120000}
  48. STAT_IFREG = $8000; {0100000}
  49. STAT_IFBLK = $6000; {0060000}
  50. STAT_IFDIR = $4000; {0040000}
  51. STAT_IFCHR = $2000; {0020000}
  52. STAT_IFIFO = $1000; {0010000}
  53. STAT_ISUID = $0800; {0004000}
  54. STAT_ISGID = $0400; {0002000}
  55. STAT_ISVTX = $0200; {0001000}
  56. { Constants to check permissions }
  57. STAT_IRWXO = $7;
  58. STAT_IROTH = $4;
  59. STAT_IWOTH = $2;
  60. STAT_IXOTH = $1;
  61. STAT_IRWXG = STAT_IRWXO shl 3;
  62. STAT_IRGRP = STAT_IROTH shl 3;
  63. STAT_IWGRP = STAT_IWOTH shl 3;
  64. STAT_IXGRP = STAT_IXOTH shl 3;
  65. STAT_IRWXU = STAT_IRWXO shl 6;
  66. STAT_IRUSR = STAT_IROTH shl 6;
  67. STAT_IWUSR = STAT_IWOTH shl 6;
  68. STAT_IXUSR = STAT_IXOTH shl 6;
  69. { Constants to test the type of filesystem }
  70. fs_old_ext2 = $ef51;
  71. fs_ext2 = $ef53;
  72. fs_ext = $137d;
  73. fs_iso = $9660;
  74. fs_minix = $137f;
  75. fs_minix_30 = $138f;
  76. fs_minux_V2 = $2468;
  77. fs_msdos = $4d44;
  78. fs_nfs = $6969;
  79. fs_proc = $9fa0;
  80. fs_xia = $012FD16D;
  81. { Constansts for MMAP }
  82. MAP_PRIVATE =2;
  83. MAP_ANONYMOUS =$20;
  84. {Constansts Termios/Ioctl (used in Do_IsDevice) }
  85. {$ifdef PowerPC}
  86. IOCtl_TCGETS=$402c7413;
  87. {$else}
  88. IOCtl_TCGETS=$5401; // TCGETS is also in termios.inc, but the sysunix needs only this
  89. {$endif}
  90. {
  91. $Log$
  92. Revision 1.10 2004-02-21 16:27:29 marco
  93. * hmprf, Linux has different ioctls kernel<->libc
  94. Revision 1.9 2004/02/21 15:14:56 marco
  95. * ppc ioctl nr fixed
  96. Revision 1.8 2003/11/19 10:56:15 marco
  97. * some constants moved from System
  98. Revision 1.7 2003/11/17 11:28:08 marco
  99. * Clone moved to linux, + few small unit unix changes
  100. Revision 1.6 2002/09/07 16:01:19 peter
  101. * old logs removed and tabs fixed
  102. }