src/os/unix/ngx_errno.h - nginx-1.7.10

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_ERRNO_H_INCLUDED_
  6. #define _NGX_ERRNO_H_INCLUDED_


  7. #include <ngx_config.h>
  8. #include <ngx_core.h>


  9. typedef int               ngx_err_t;

  10. #define NGX_EPERM         EPERM
  11. #define NGX_ENOENT        ENOENT
  12. #define NGX_ENOPATH       ENOENT
  13. #define NGX_ESRCH         ESRCH
  14. #define NGX_EINTR         EINTR
  15. #define NGX_ECHILD        ECHILD
  16. #define NGX_ENOMEM        ENOMEM
  17. #define NGX_EACCES        EACCES
  18. #define NGX_EBUSY         EBUSY
  19. #define NGX_EEXIST        EEXIST
  20. #define NGX_EXDEV         EXDEV
  21. #define NGX_ENOTDIR       ENOTDIR
  22. #define NGX_EISDIR        EISDIR
  23. #define NGX_EINVAL        EINVAL
  24. #define NGX_ENFILE        ENFILE
  25. #define NGX_EMFILE        EMFILE
  26. #define NGX_ENOSPC        ENOSPC
  27. #define NGX_EPIPE         EPIPE
  28. #define NGX_EINPROGRESS   EINPROGRESS
  29. #define NGX_ENOPROTOOPT   ENOPROTOOPT
  30. #define NGX_EOPNOTSUPP    EOPNOTSUPP
  31. #define NGX_EADDRINUSE    EADDRINUSE
  32. #define NGX_ECONNABORTED  ECONNABORTED
  33. #define NGX_ECONNRESET    ECONNRESET
  34. #define NGX_ENOTCONN      ENOTCONN
  35. #define NGX_ETIMEDOUT     ETIMEDOUT
  36. #define NGX_ECONNREFUSED  ECONNREFUSED
  37. #define NGX_ENAMETOOLONG  ENAMETOOLONG
  38. #define NGX_ENETDOWN      ENETDOWN
  39. #define NGX_ENETUNREACH   ENETUNREACH
  40. #define NGX_EHOSTDOWN     EHOSTDOWN
  41. #define NGX_EHOSTUNREACH  EHOSTUNREACH
  42. #define NGX_ENOSYS        ENOSYS
  43. #define NGX_ECANCELED     ECANCELED
  44. #define NGX_EILSEQ        EILSEQ
  45. #define NGX_ENOMOREFILES  0
  46. #define NGX_ELOOP         ELOOP
  47. #define NGX_EBADF         EBADF

  48. #if (NGX_HAVE_OPENAT)
  49. #define NGX_EMLINK        EMLINK
  50. #endif

  51. #if (__hpux__)
  52. #define NGX_EAGAIN        EWOULDBLOCK
  53. #else
  54. #define NGX_EAGAIN        EAGAIN
  55. #endif


  56. #define ngx_errno                  errno
  57. #define ngx_socket_errno           errno
  58. #define ngx_set_errno(err)         errno = err
  59. #define ngx_set_socket_errno(err)  errno = err


  60. u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
  61. ngx_int_t ngx_strerror_init(void);


  62. #endif /* _NGX_ERRNO_H_INCLUDED_ */