syscalls.c 780 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include <reent.h>
  2. #include <sys/errno.h>
  3. int _fork_r (struct _reent *r)
  4. {
  5. /* return "not supported" */
  6. r->_errno = ENOTSUP;
  7. return -1;
  8. }
  9. _ssize_t
  10. _read_r (struct _reent *r, int fd, void *buf, size_t nbytes)
  11. {
  12. _ssize_t rc;
  13. rc = -1;
  14. /* return "not supported" */
  15. r->_errno = ENOTSUP;
  16. return rc;
  17. }
  18. _ssize_t
  19. _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)
  20. {
  21. _ssize_t rc;
  22. rc = -1;
  23. /* return "not supported" */
  24. r->_errno = ENOTSUP;
  25. return rc;
  26. }
  27. int
  28. _close_r (struct _reent *r, int fd)
  29. {
  30. _ssize_t rc;
  31. rc = -1;
  32. /* return "not supported" */
  33. r->_errno = ENOTSUP;
  34. return rc;
  35. }
  36. _off_t
  37. _lseek_r (struct _reent *r, int fd, _off_t offset, int whence)
  38. {
  39. _ssize_t rc;
  40. rc = -1;
  41. /* return "not supported" */
  42. r->_errno = ENOTSUP;
  43. return rc;
  44. }