errno.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * errno.h
  3. *
  4. * Copyright (C) 2017 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 <stdint.h>
  22. #define EPERM 1
  23. #define ENOENT 2
  24. #define ESRCH 3
  25. #define EINTR 4
  26. #define EIO 5
  27. #define ENXIO 6
  28. #define E2BIG 7
  29. #define ENOEXEC 8
  30. #define EBADF 9
  31. #define ECHILD 10
  32. #define EAGAIN 11
  33. #define ENOMEM 12
  34. #define EACCES 13
  35. #define EFAULT 14
  36. #define EBUSY 16
  37. #define EEXIST 17
  38. #define EXDEV 18
  39. #define ENODEV 19
  40. #define ENOTDIR 20
  41. #define EISDIR 21
  42. #define EINVAL 22
  43. #define ENFILE 23
  44. #define EMFILE 24
  45. #define ENOTTY 25
  46. #define EFBIG 27
  47. #define ENOSPC 28
  48. #define ESPIPE 29
  49. #define EROFS 30
  50. #define EMLINK 31
  51. #define EPIPE 32
  52. #define EDOM 33
  53. #define ERANGE 34
  54. #define EDEADLK 36
  55. #define EDEADLOCK EDEADLK
  56. #define ENAMETOOLONG 38
  57. #define ENOLCK 39
  58. #define ENOSYS 40
  59. #define ENOTEMPTY 41
  60. #define EILSEQ 42
  61. #define ECANCELED 43
  62. #define ETIMEDOUT 44
  63. #define ETOOSMALL 45
  64. #define EOVERFLOW 46
  65. extern int errno;
  66. int __crt_translate_error(uint32_t status_code);
  67. #endif