|
|
|
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 |