comparison packages/error/current/include/errno.h @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents
children 51b34619b677
comparison
equal deleted inserted replaced
114:5ad2b71d525e 115:6ed91473a1cd
1 #ifndef CYGONCE_ERROR_ERRNO_H
2 #define CYGONCE_ERROR_ERRNO_H
3 /*========================================================================
4 //
5 // errno.h
6 //
7 // ISO C errno variable and constants
8 //
9 //========================================================================
10 //####COPYRIGHTBEGIN####
11 //
12 // -------------------------------------------
13 // The contents of this file are subject to the Red Hat eCos Public License
14 // Version 1.1 (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://www.redhat.com/
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 Configurable Operating System,
24 // released September 30, 1998.
25 //
26 // The Initial Developer of the Original Code is Red Hat.
27 // Portions created by Red Hat are
28 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
29 // All Rights Reserved.
30 // -------------------------------------------
31 //
32 //####COPYRIGHTEND####
33 //========================================================================
34 //#####DESCRIPTIONBEGIN####
35 //
36 // Author(s): jlarmour
37 // Contributors: jlarmour
38 // Date: 2000-04-14
39 // Purpose: This file provides the errno variable (or more strictly
40 // expression) required by ISO C and POSIX 1003.1
41 // Description:
42 // Usage: Do not include this file directly - use #include <errno.h>
43 //
44 //####DESCRIPTIONEND####
45 //
46 //======================================================================*/
47
48 /* CONFIGURATION */
49
50 #include <pkgconf/error.h> /* Configuration header */
51
52 #ifdef CYGPKG_ERROR_ERRNO
53
54 /* INCLUDES */
55
56 #include <cyg/error/codes.h> /* for Cyg_ErrNo */
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 /* FUNCTION PROTOTYPES */
63
64
65 #ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
66
67 extern Cyg_ErrNo * const
68 cyg_error_get_errno_p( void ) __attribute__((const));
69
70 #endif /* ifdef CYGSEM_ERROR_PER_THREAD_ERRNO */
71
72
73 /* VARIABLES */
74
75 #ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
76 # define errno (*cyg_error_get_errno_p()) /* Per-thread error status */
77 #else
78 extern Cyg_ErrNo errno; /* Global error status */
79 #endif /* ifdef CYGSEM_ERROR_PER_THREAD_ERRNO */
80
81 #ifdef __cplusplus
82 } /* extern "C" */
83 #endif
84
85 #endif /* ifdef CYGPKG_ERROR_ERRNO */
86
87 #endif /* CYGONCE_ERROR_ERRNO_H multiple inclusion protection */
88
89 /* EOF errno.h */