Send a crash report when a hung process is detected.
[chromium-blink-merge.git] / native_client_sdk / src / libraries / third_party / pthreads-win32 / need_errno.h
blobabf1c95574215075afcee30cf329e5f5f2f92c61
1 /***
2 * errno.h - system wide error numbers (set by system calls)
4 * Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
6 * Purpose:
7 * This file defines the system-wide error numbers (set by
8 * system calls). Conforms to the XENIX standard. Extended
9 * for compatibility with Uniforum standard.
10 * [System V]
12 * [Public]
14 ****/
16 #if _MSC_VER > 1000
17 #pragma once
18 #endif
20 #if !defined(_INC_ERRNO)
21 #define _INC_ERRNO
23 #if !defined(_WIN32)
24 #error ERROR: Only Win32 targets supported!
25 #endif
27 #include <winsock.h>
29 #if defined(__cplusplus)
30 extern "C" {
31 #endif
35 /* Define _CRTIMP */
37 #ifndef _CRTIMP
38 #if defined(_DLL)
39 #define _CRTIMP __declspec(dllimport)
40 #else /* ndef _DLL */
41 #define _CRTIMP
42 #endif /* _DLL */
43 #endif /* _CRTIMP */
46 /* Define __cdecl for non-Microsoft compilers */
48 #if ( !defined(_MSC_VER) && !defined(__cdecl) )
49 #define __cdecl
50 #endif
52 /* Define _CRTAPI1 (for compatibility with the NT SDK) */
54 #if !defined(_CRTAPI1)
55 #if _MSC_VER >= 800 && _M_IX86 >= 300
56 #define _CRTAPI1 __cdecl
57 #else
58 #define _CRTAPI1
59 #endif
60 #endif
62 #if !defined(PTW32_STATIC_LIB)
63 # if defined(PTW32_BUILD)
64 # define PTW32_DLLPORT __declspec (dllexport)
65 # else
66 # define PTW32_DLLPORT __declspec (dllimport)
67 # endif
68 #else
69 # define PTW32_DLLPORT
70 #endif
72 /* declare reference to errno */
74 #if (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC)
75 PTW32_DLLPORT int * __cdecl _errno(void);
76 #define errno (*_errno())
77 #else /* ndef _MT && ndef _MD && ndef _DLL */
78 _CRTIMP extern int errno;
79 #endif /* _MT || _MD || _DLL */
81 /* Error Codes */
83 #define EPERM 1
84 #define ENOENT 2
85 #define ESRCH 3
86 #define EINTR 4
87 #define EIO 5
88 #define ENXIO 6
89 #define E2BIG 7
90 #define ENOEXEC 8
91 #define EBADF 9
92 #define ECHILD 10
93 #define EAGAIN 11
94 #define ENOMEM 12
95 #define EACCES 13
96 #define EFAULT 14
97 #define EBUSY 16
98 #define EEXIST 17
99 #define EXDEV 18
100 #define ENODEV 19
101 #define ENOTDIR 20
102 #define EISDIR 21
103 #define EINVAL 22
104 #define ENFILE 23
105 #define EMFILE 24
106 #define ENOTTY 25
107 #define EFBIG 27
108 #define ENOSPC 28
109 #define ESPIPE 29
110 #define EROFS 30
111 #define EMLINK 31
112 #define EPIPE 32
113 #define EDOM 33
114 #define ERANGE 34
115 #define EDEADLK 36
117 /* defined differently in winsock.h on WinCE */
118 #if !defined(ENAMETOOLONG)
119 #define ENAMETOOLONG 38
120 #endif
122 #define ENOLCK 39
123 #define ENOSYS 40
125 /* defined differently in winsock.h on WinCE */
126 #if !defined(ENOTEMPTY)
127 #define ENOTEMPTY 41
128 #endif
130 #define EILSEQ 42
132 /* POSIX 2008 - robust mutexes */
133 #define EOWNERDEAD 43
134 #define ENOTRECOVERABLE 44
137 * Support EDEADLOCK for compatibiity with older MS-C versions.
139 #define EDEADLOCK EDEADLK
141 #if defined(__cplusplus)
143 #endif
145 #endif /* _INC_ERRNO */