sysconst.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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; // %100 etc
  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 Termios/Ioctl (used in Do_IsDevice) }
  78. {$ifdef PowerPC}
  79. IOCtl_TCGETS=$402c7413;
  80. {$else}
  81. IOCtl_TCGETS=$5401; // TCGETS is also in termios.inc, but the sysunix needs only this
  82. {$endif}
  83. {
  84. $Log$
  85. Revision 1.12 2005-02-13 20:01:38 peter
  86. * include file cleanup
  87. Revision 1.11 2004/11/14 12:21:08 marco
  88. * moved some calls from unix to baseunix. Darwin untested.
  89. Revision 1.10 2004/02/21 16:27:29 marco
  90. * hmprf, Linux has different ioctls kernel<->libc
  91. Revision 1.9 2004/02/21 15:14:56 marco
  92. * ppc ioctl nr fixed
  93. Revision 1.8 2003/11/19 10:56:15 marco
  94. * some constants moved from System
  95. Revision 1.7 2003/11/17 11:28:08 marco
  96. * Clone moved to linux, + few small unit unix changes
  97. Revision 1.6 2002/09/07 16:01:19 peter
  98. * old logs removed and tabs fixed
  99. }