errno.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * errno.h
  3. *
  4. * Copyright (C) 2019 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _ERRNO_H_
  20. #define _ERRNO_H_
  21. #include <mlcrt.h>
  22. #include <stdint.h>
  23. #define EPERM 1
  24. #define ENOENT 2
  25. #define ESRCH 3
  26. #define EINTR 4
  27. #define EIO 5
  28. #define ENXIO 6
  29. #define E2BIG 7
  30. #define ENOEXEC 8
  31. #define EBADF 9
  32. #define ECHILD 10
  33. #define EAGAIN 11
  34. #define ENOMEM 12
  35. #define EACCES 13
  36. #define EFAULT 14
  37. #define EBUSY 16
  38. #define EEXIST 17
  39. #define EXDEV 18
  40. #define ENODEV 19
  41. #define ENOTDIR 20
  42. #define EISDIR 21
  43. #define EINVAL 22
  44. #define ENFILE 23
  45. #define EMFILE 24
  46. #define ENOTTY 25
  47. #define EFBIG 27
  48. #define ENOSPC 28
  49. #define ESPIPE 29
  50. #define EROFS 30
  51. #define EMLINK 31
  52. #define EPIPE 32
  53. #define EDOM 33
  54. #define ERANGE 34
  55. #define EDEADLK 36
  56. #define EDEADLOCK EDEADLK
  57. #define ENAMETOOLONG 38
  58. #define ENOLCK 39
  59. #define ENOSYS 40
  60. #define ENOTEMPTY 41
  61. #define EILSEQ 42
  62. #define ECANCELED 43
  63. #define ETIMEDOUT 44
  64. #define ETOOSMALL 45
  65. #define EOVERFLOW 46
  66. extern int __CRT_PUBLIC(errno);
  67. int __CRT_PRIVATE(translate_error)(uint32_t status_code);
  68. #endif