2
0

osdefs.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. Copyright (c) 2000-2002 by Marco van de Voort
  3. Target dependent defines used when compileing the baseunix unit
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  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. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  15. MA 02110-1301, USA.
  16. ****************************************************************************}
  17. {$ifndef cpux86_64}
  18. {$define usestime} // Use stime() syscall instead of settimeofday
  19. {$endif}
  20. {$define oldreaddir} // Keep using readdir system call instead
  21. // of userland getdents stuff.
  22. {$define usedomain} // Allow uname with "domain" entry.
  23. // (which is a GNU extension)
  24. {$ifdef FPC_USE_LIBC}
  25. {$define usegetcwd}
  26. {$if not defined(cpux86) and not defined(cpux86_64)}
  27. {$linklib m}
  28. {$endif}
  29. {$endif}
  30. {$if defined(cpupowerpc) or defined(cpupowerpc64) or defined(cpui386) or
  31. (defined(cpuarm) and defined(FPC_ABI_EABI))}
  32. {$DEFINE has_ugetrlimit}
  33. {$endif}
  34. {$if (defined(cpuarm) and defined(FPC_ABI_EABI))}
  35. {$define FPC_USEGETTIMEOFDAY}
  36. {$undef usestime}
  37. {$define NO_SYSCALL_TIME}
  38. {$define NO_SYSCALL_UMOUNT}
  39. {$define NO_SYSCALL_STIME}
  40. {$define NO_SYSCALL_ALARM}
  41. {$define NO_SYSCALL_UTIME}
  42. {$define NO_SYSCALL_GETRLIMIT}
  43. {$define NO_SYSCALL_SELECT}
  44. {$define NO_SYSCALL_READDIR}
  45. {$define NO_SYSCALL_MMAP}
  46. {$define NO_SYSCALL_SOCKETCALL}
  47. {$define NO_SYSCALL_SYSCALL}
  48. {$define NO_SYSCALL_IPC}
  49. {$endif}
  50. {$ifdef CPUARM}
  51. {$define WAIT4}
  52. {$endif CPUARM}
  53. {$ifdef CPUx86_64}
  54. {$define WAIT4}
  55. {$endif CPUx86_64}
  56. {$ifdef CPUSPARC}
  57. {$define WAIT4}
  58. {$endif CPUSPARC}
  59. {$ifdef cpui386}
  60. {$define OLDMMAP}
  61. {$endif cpui386}
  62. {$ifdef cpum68k}
  63. {$define OLDMMAP}
  64. {$endif cpum68k}
  65. {$ifdef cpuarm}
  66. {$ifdef FPC_ABI_EABI}
  67. {$define MMAP2}
  68. {$else FPC_ABI_EABI}
  69. {$define OLDMMAP}
  70. {$endif FPC_ABI_EABI}
  71. {$endif cpuarm}
  72. {$ifdef cpuaarch64}
  73. {$define generic_linux_syscalls}
  74. {$undef usestime}
  75. {$define userenameat}
  76. {$endif cpuaarch64}
  77. {$ifdef cpusparc64}
  78. {$define FPC_USEGETTIMEOFDAY}
  79. {$endif cpusparc64}
  80. {$ifdef cpuriscv32}
  81. {$define generic_linux_syscalls}
  82. {$undef usestime}
  83. {$endif cpuriscv32}
  84. {$ifdef cpuriscv64}
  85. {$define generic_linux_syscalls}
  86. {$undef usestime}
  87. {$endif cpuriscv64}
  88. {$ifdef android}
  89. {$define generic_linux_syscalls}
  90. {$ifdef cpuarm}
  91. {$define NO_SYSCALL_PSELECT6}
  92. {$define NO_SYSCALL_PPOLL}
  93. {$endif cpuarm}
  94. {$define userenameat}
  95. {$undef usestime}
  96. {$undef OLDMMAP}
  97. {$ifndef cpu64}
  98. {$define MMAP2}
  99. {$endif}
  100. {$endif android}