|
0
|
1 #ifndef CYGONCE_LIBC_ERRNO_H |
|
|
2 #define CYGONCE_LIBC_ERRNO_H |
|
|
3 //======================================================================== |
|
|
4 // |
|
|
5 // errno.h |
|
|
6 // |
|
2
|
7 // ISO C errno variable and constants |
|
0
|
8 // |
|
|
9 //======================================================================== |
|
|
10 //####COPYRIGHTBEGIN#### |
|
|
11 // |
|
|
12 // ------------------------------------------- |
|
|
13 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
14 // Version 1.0 (the "License"); you may not use this file except in |
|
|
15 // compliance with the License. You may obtain a copy of the License at |
|
|
16 // http://sourceware.cygnus.com/ecos |
|
|
17 // |
|
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
20 // License for the specific language governing rights and limitations under |
|
|
21 // the License. |
|
|
22 // |
|
|
23 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
24 // September 30, 1998. |
|
|
25 // |
|
|
26 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
2
|
27 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
|
0
|
28 // ------------------------------------------- |
|
|
29 // |
|
|
30 //####COPYRIGHTEND#### |
|
|
31 //======================================================================== |
|
|
32 //#####DESCRIPTIONBEGIN#### |
|
|
33 // |
|
2
|
34 // Author(s): jlarmour |
|
|
35 // Contributors: jlarmour |
|
|
36 // Date: 1999-01-21 |
|
|
37 // Purpose: This file provides the errno variable (or more strictly |
|
|
38 // expression) and the E* error codes required by ISO C |
|
|
39 // and POSIX 1003.1 |
|
0
|
40 // Description: |
|
2
|
41 // Usage: #include <errno.h> |
|
0
|
42 // |
|
|
43 //####DESCRIPTIONEND#### |
|
|
44 // |
|
|
45 //======================================================================== |
|
|
46 |
|
|
47 // CONFIGURATION |
|
|
48 |
|
|
49 #include <pkgconf/libc.h> // Configuration header |
|
|
50 |
|
|
51 // INCLUDES |
|
|
52 |
|
|
53 #include <cyg/infra/cyg_type.h> // Common type definitions etc. |
|
|
54 #include <cyg/error/codes.h> // Common error code definitions |
|
|
55 |
|
|
56 // FUNCTION PROTOTYPES |
|
|
57 |
|
|
58 #ifdef CYGSEM_LIBC_PER_THREAD_ERRNO |
|
|
59 |
|
2
|
60 externC Cyg_ErrNo * const |
|
|
61 cyg_libc_get_errno_p( void ) CYGBLD_ATTRIB_CONST; |
|
0
|
62 |
|
|
63 #endif // ifdef CYGSEM_LIBC_PER_THREAD_ERRNO |
|
|
64 |
|
|
65 // VARIABLES |
|
|
66 |
|
|
67 #ifdef CYGSEM_LIBC_PER_THREAD_ERRNO |
|
|
68 |
|
2
|
69 # define errno (*cyg_libc_get_errno_p()) // Global error status |
|
0
|
70 |
|
|
71 #else |
|
|
72 |
|
|
73 externC Cyg_ErrNo errno; // Global error status |
|
|
74 |
|
|
75 #endif // ifdef CYGSEM_LIBC_PER_THREAD_ERRNO |
|
|
76 |
|
|
77 |
|
|
78 #endif // CYGONCE_LIBC_ERRNO_H multiple inclusion protection |
|
|
79 |
|
|
80 // EOF errno.h |