aliases.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Copyright 2024 The Libc Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build linux && (amd64 || arm64 || loong64 || ppc64le || s390x || riscv64 || 386 || arm)
  5. package libc // import "modernc.org/libc"
  6. func X__vm_wait(tls *TLS) {}
  7. // static volatile int *const dummy_lockptr = 0;
  8. //
  9. // weak_alias(dummy_lockptr, __atexit_lockptr);
  10. // weak_alias(dummy_lockptr, __bump_lockptr);
  11. // weak_alias(dummy_lockptr, __sem_open_lockptr);
  12. var X__atexit_lockptr int32
  13. var X__bump_lockptr int32
  14. var X__sem_open_lockptr int32
  15. // static int dummy(int fd)
  16. //
  17. // {
  18. // return fd;
  19. // }
  20. //
  21. // weak_alias(dummy, __aio_close);
  22. func X__aio_close(tls *TLS, fd int32) int32 {
  23. return fd
  24. }
  25. func Xtzset(tls *TLS) {
  26. ___tzset(tls)
  27. }
  28. type DIR = TDIR
  29. const DT_DETACHED = _DT_DETACHED
  30. const DT_EXITING = _DT_EXITING
  31. const DT_JOINABLE = _DT_JOINABLE
  32. type FILE = TFILE
  33. type HEADER = THEADER
  34. func Xfcntl64(tls *TLS, fd int32, cmd int32, va uintptr) (r int32) {
  35. return Xfcntl(tls, fd, cmd, va)
  36. }
  37. func Xfopen64(tls *TLS, filename uintptr, mode uintptr) (r uintptr) {
  38. return Xfopen(tls, filename, mode)
  39. }
  40. func Xfstat64(tls *TLS, fd int32, st uintptr) (r int32) {
  41. return Xfstat(tls, fd, st)
  42. }
  43. func Xftruncate64(tls *TLS, fd int32, length Toff_t) (r int32) {
  44. return Xftruncate(tls, fd, length)
  45. }
  46. func Xgetrlimit64(tls *TLS, resource int32, rlim uintptr) (r int32) {
  47. return Xgetrlimit(tls, resource, rlim)
  48. }
  49. func Xlseek64(tls *TLS, fd int32, offset Toff_t, whence int32) (r Toff_t) {
  50. return Xlseek(tls, fd, offset, whence)
  51. }
  52. func Xlstat64(tls *TLS, path uintptr, buf uintptr) (r int32) {
  53. return Xlstat(tls, path, buf)
  54. }
  55. func Xmkstemp64(tls *TLS, template uintptr) (r int32) {
  56. return Xmkstemp(tls, template)
  57. }
  58. func Xmkstemps64(tls *TLS, template uintptr, len1 int32) (r int32) {
  59. return Xmkstemps(tls, template, len1)
  60. }
  61. func Xmmap64(tls *TLS, start uintptr, len1 Tsize_t, prot int32, flags int32, fd int32, off Toff_t) (r uintptr) {
  62. return Xmmap(tls, start, len1, prot, flags, fd, off)
  63. }
  64. func Xopen64(tls *TLS, filename uintptr, flags int32, va uintptr) (r int32) {
  65. return Xopen(tls, filename, flags, va)
  66. }
  67. func Xreaddir64(tls *TLS, dir uintptr) (r uintptr) {
  68. return Xreaddir(tls, dir)
  69. }
  70. func Xsetrlimit64(tls *TLS, resource int32, rlim uintptr) (r int32) {
  71. return Xsetrlimit(tls, resource, rlim)
  72. }
  73. func Xstat64(tls *TLS, path uintptr, buf uintptr) (r int32) {
  74. return Xstat(tls, path, buf)
  75. }
  76. func Xpthread_setcancelstate(tls *TLS, new int32, old uintptr) int32 {
  77. return _pthread_setcancelstate(tls, new, old)
  78. }
  79. func Xpthread_sigmask(tls *TLS, now int32, set, old uintptr) int32 {
  80. return _pthread_sigmask(tls, now, set, old)
  81. }