|
|
|
1 |
|
/*** |
2 |
|
*errno.h - system wide error numbers (set by system calls) |
3 |
|
* |
4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
5 |
|
* |
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] |
11 |
|
* |
12 |
|
* [Public] |
13 |
|
* |
14 |
|
****/ |
15 |
|
|
16 |
|
#if _MSC_VER > 1000 |
17 |
|
#pragma once |
18 |
|
#endif |
19 |
|
|
20 |
|
#ifndef _INC_ERRNO |
21 |
|
#define _INC_ERRNO |
22 |
|
|
23 |
|
#include <crtdefs.h> |
24 |
|
|
25 |
|
#ifdef __cplusplus |
26 |
|
extern "C" { |
27 |
|
#endif |
28 |
|
|
29 |
|
/* declare reference to errno */ |
30 |
|
|
31 |
|
#ifndef _CRT_ERRNO_DEFINED |
32 |
|
#define _CRT_ERRNO_DEFINED |
33 |
|
_CRTIMP extern int * __cdecl _errno(void); |
34 |
|
#define errno (*_errno()) |
35 |
|
|
36 |
|
errno_t __cdecl _set_errno(_In_ int _Value); |
37 |
|
errno_t __cdecl _get_errno(_Out_ int * _Value); |
38 |
|
#endif |
39 |
|
|
40 |
|
/* Error Codes */ |
41 |
|
|
42 |
|
#define EPERM 1 |
43 |
|
#define ENOENT 2 |
44 |
|
#define ESRCH 3 |
45 |
|
#define EINTR 4 |
46 |
|
#define EIO 5 |
47 |
|
#define ENXIO 6 |
48 |
|
#define E2BIG 7 |
49 |
|
#define ENOEXEC 8 |
50 |
|
#define EBADF 9 |
51 |
|
#define ECHILD 10 |
52 |
|
#define EAGAIN 11 |
53 |
|
#define ENOMEM 12 |
54 |
|
#define EACCES 13 |
55 |
|
#define EFAULT 14 |
56 |
|
#define EBUSY 16 |
57 |
|
#define EEXIST 17 |
58 |
|
#define EXDEV 18 |
59 |
|
#define ENODEV 19 |
60 |
|
#define ENOTDIR 20 |
61 |
|
#define EISDIR 21 |
62 |
|
#define ENFILE 23 |
63 |
|
#define EMFILE 24 |
64 |
|
#define ENOTTY 25 |
65 |
|
#define EFBIG 27 |
66 |
|
#define ENOSPC 28 |
67 |
|
#define ESPIPE 29 |
68 |
|
#define EROFS 30 |
69 |
|
#define EMLINK 31 |
70 |
|
#define EPIPE 32 |
71 |
|
#define EDOM 33 |
72 |
|
#define EDEADLK 36 |
73 |
|
#define ENAMETOOLONG 38 |
74 |
|
#define ENOLCK 39 |
75 |
|
#define ENOSYS 40 |
76 |
|
#define ENOTEMPTY 41 |
77 |
|
|
78 |
|
/* Error codes used in the Secure CRT functions */ |
79 |
|
|
80 |
|
#ifndef RC_INVOKED |
81 |
|
#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED) |
82 |
|
#define _SECURECRT_ERRCODE_VALUES_DEFINED |
83 |
|
#define EINVAL 22 |