sysconst.inc 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. Constants for Unix unit.
  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. { The waitpid uses the following options:}
  18. Wait_NoHang = 1;
  19. Wait_UnTraced = 2;
  20. Wait_Any = -1;
  21. Wait_MyPGRP = 0;
  22. { Constants to check stat.mode - checked all STAT constants with BSD}
  23. STAT_IFMT = $f000; {00170000 }
  24. STAT_IFSOCK = $c000; {0140000 }
  25. STAT_IFLNK = $a000; {0120000 }
  26. STAT_IFREG = $8000; {0100000 }
  27. STAT_IFBLK = $6000; {0060000 }
  28. STAT_IFDIR = $4000; {0040000 }
  29. STAT_IFCHR = $2000; {0020000 }
  30. STAT_IFIFO = $1000; {0010000 }
  31. STAT_ISUID = $0800; {0004000 }
  32. STAT_ISGID = $0400; {0002000 }
  33. STAT_ISVTX = $0200; {0001000}
  34. { Constants to check permissions all }
  35. STAT_IRWXO = $7;
  36. STAT_IROTH = $4;
  37. STAT_IWOTH = $2;
  38. STAT_IXOTH = $1;
  39. STAT_IRWXG = STAT_IRWXO shl 3;
  40. STAT_IRGRP = STAT_IROTH shl 3;
  41. STAT_IWGRP = STAT_IWOTH shl 3;
  42. STAT_IXGRP = STAT_IXOTH shl 3;
  43. STAT_IRWXU = STAT_IRWXO shl 6;
  44. STAT_IRUSR = STAT_IROTH shl 6;
  45. STAT_IWUSR = STAT_IWOTH shl 6;
  46. STAT_IXUSR = STAT_IXOTH shl 6;
  47. { Constants to test the type of filesystem }
  48. fs_old_ext2 = $ef51;
  49. fs_ext2 = $ef53;
  50. fs_ext = $137d;
  51. fs_iso = $9660;
  52. fs_minix = $137f;
  53. fs_minix_30 = $138f;
  54. fs_minux_V2 = $2468;
  55. fs_msdos = $4d44;
  56. fs_nfs = $6969;
  57. fs_proc = $9fa0;
  58. fs_xia = $012FD16D;
  59. {Constansts Termios/Ioctl (used in Do_IsDevice) }
  60. IOCtl_TCGETS= $40000000+$2C7400+ 19; // TCGETS is also in termios.inc, but the sysunix needs only this
  61. ITimer_Real =0;
  62. ITimer_Virtual =1;
  63. ITimer_Prof =2;
  64. {
  65. {Checked for BSD using Linuxthreads port}
  66. { cloning flags }
  67. CSIGNAL = $000000ff; // signal mask to be sent at exit
  68. CLONE_VM = $00000100; // set if VM shared between processes
  69. CLONE_FS = $00000200; // set if fs info shared between processes
  70. CLONE_FILES = $00000400; // set if open files shared between processes
  71. CLONE_SIGHAND = $00000800; // set if signal handlers shared
  72. CLONE_PID = $00001000; // set if pid shared
  73. type
  74. TCloneFunc=function(args:pointer):longint;cdecl;
  75. }