osdefs.inc 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. {$endif cpuaarch64}