~nginx/nginx/1.0

« back to all changes in this revision

Viewing changes to src/os/unix/ngx_errno.h

  • Committer: Michael Lustfield
  • Date: 2010-12-01 08:06:25 UTC
  • Revision ID: michael@profarius.com-20101201080625-y8i4bq0e54ev2qwy
Tags: 0.9.0
Nginx v0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Copyright (C) Igor Sysoev
 
4
 */
 
5
 
 
6
 
 
7
#ifndef _NGX_ERRNO_H_INCLUDED_
 
8
#define _NGX_ERRNO_H_INCLUDED_
 
9
 
 
10
 
 
11
#include <ngx_config.h>
 
12
#include <ngx_core.h>
 
13
 
 
14
 
 
15
typedef int               ngx_err_t;
 
16
 
 
17
#define NGX_EPERM         EPERM
 
18
#define NGX_ENOENT        ENOENT
 
19
#define NGX_ENOPATH       ENOENT
 
20
#define NGX_ESRCH         ESRCH
 
21
#define NGX_EINTR         EINTR
 
22
#define NGX_ECHILD        ECHILD
 
23
#define NGX_ENOMEM        ENOMEM
 
24
#define NGX_EACCES        EACCES
 
25
#define NGX_EBUSY         EBUSY
 
26
#define NGX_EEXIST        EEXIST
 
27
#define NGX_EXDEV         EXDEV
 
28
#define NGX_ENOTDIR       ENOTDIR
 
29
#define NGX_EISDIR        EISDIR
 
30
#define NGX_EINVAL        EINVAL
 
31
#define NGX_ENOSPC        ENOSPC
 
32
#define NGX_EPIPE         EPIPE
 
33
#define NGX_EINPROGRESS   EINPROGRESS
 
34
#define NGX_EADDRINUSE    EADDRINUSE
 
35
#define NGX_ECONNABORTED  ECONNABORTED
 
36
#define NGX_ECONNRESET    ECONNRESET
 
37
#define NGX_ENOTCONN      ENOTCONN
 
38
#define NGX_ETIMEDOUT     ETIMEDOUT
 
39
#define NGX_ECONNREFUSED  ECONNREFUSED
 
40
#define NGX_ENAMETOOLONG  ENAMETOOLONG
 
41
#define NGX_ENETDOWN      ENETDOWN
 
42
#define NGX_ENETUNREACH   ENETUNREACH
 
43
#define NGX_EHOSTDOWN     EHOSTDOWN
 
44
#define NGX_EHOSTUNREACH  EHOSTUNREACH
 
45
#define NGX_ENOSYS        ENOSYS
 
46
#define NGX_ECANCELED     ECANCELED
 
47
#define NGX_EILSEQ        EILSEQ
 
48
#define NGX_ENOMOREFILES  0
 
49
 
 
50
#if (__hpux__)
 
51
#define NGX_EAGAIN        EWOULDBLOCK
 
52
#else
 
53
#define NGX_EAGAIN        EAGAIN
 
54
#endif
 
55
 
 
56
 
 
57
#define ngx_errno                  errno
 
58
#define ngx_socket_errno           errno
 
59
#define ngx_set_errno(err)         errno = err
 
60
#define ngx_set_socket_errno(err)  errno = err
 
61
 
 
62
 
 
63
u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
 
64
ngx_uint_t ngx_strerror_init(void);
 
65
 
 
66
 
 
67
#endif /* _NGX_ERRNO_H_INCLUDED_ */