libbsd.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright 2023 The libbsd-go Authors. All rights reserved.
  2. // Use of the source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:generate go run generator.go
  5. // Package libsd is a ccgo/v4 version of libbsd.a: Utility functions from BSD systems.
  6. package libbsd // import "modernc.org/libbsd"
  7. import (
  8. "modernc.org/libc"
  9. )
  10. func __rs_forkhandler(tls *libc.TLS) {
  11. // nop
  12. }
  13. func __rs_forkdetect(tls *libc.TLS) {
  14. // nop
  15. }
  16. func _warnx(tls *libc.TLS, format uintptr, va uintptr) {
  17. panic(todo(""))
  18. // Xwarnc(tls, -1, format, va)
  19. }
  20. func _dl_iterate_phdr(...any) {
  21. panic(todo(""))
  22. }
  23. func _statfs(...any) int32 {
  24. panic(todo(""))
  25. }
  26. func _strtonum(tls *libc.TLS, nptr uintptr, minval int64, maxval int64, errstr uintptr) (r int64) {
  27. panic(todo(""))
  28. }
  29. // int dirfd(DIR *dirp);
  30. func _dirfd(tls *libc.TLS, dir uintptr) (r int32) {
  31. panic(todo(""))
  32. }
  33. // int openat(int fd, const char *path, int oflag, ...);
  34. func _openat(tls *libc.TLS, fd int32, path uintptr, oflag int32, va uintptr) (r int32) {
  35. panic(todo(""))
  36. }
  37. // int fstatat(int fd, const char *path, struct stat *buf, int flag);
  38. func _fstatat(tls *libc.TLS, fd int32, path, buf uintptr, flag int32) (r int32) {
  39. panic(todo(""))
  40. }
  41. // int asprintf(char **ret, const char *format, ...);
  42. func _asprintf(tls *libc.TLS, ret, format uintptr, va uintptr) (r int32) {
  43. panic(todo(""))
  44. }
  45. // void setprogname(const char *progname);
  46. func _setprogname(tls *libc.TLS, progname uintptr) {
  47. panic(todo(""))
  48. }
  49. // int getpagesize(void);
  50. func _getpagesize(tls *libc.TLS) int32 {
  51. panic(todo(""))
  52. }