source: rtems/cpukit/libcsupport/src/hosterr.c @ eb5a7e07

4.104.114.84.95
Last change on this file since eb5a7e07 was eb5a7e07, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 6, 1995 at 8:48:38 PM

fixed missing CVS IDs

  • Property mode set to 100644
File size: 960 bytes
Line 
1/*
2 *  Routines to access a host errno
3 *
4 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
5 *  On-Line Applications Research Corporation (OAR).
6 *  All rights assigned to U.S. Government, 1994.
7 *
8 *  This material may be reproduced by or for the U.S. Government pursuant
9 *  to the copyright license under the clause at DFARS 252.227-7013.  This
10 *  notice must appear in all copies of this file and its derivatives.
11 *
12 *  $Id$
13 */
14
15#include <rtems.h>
16#include <errno.h>
17
18int host_errno(void);
19
20/*
21 * copy host errno, if any to thread aware errno, if any
22 */
23
24void fix_syscall_errno(void)
25{
26    errno = host_errno();
27}
28
29/*
30 * Get the host system errno, if any
31 * When using newlib (or possibly other libc's) on top of UNIX
32 * the errno returned by system calls may be unavailable due
33 * to trickery of making errno thread aware.
34 * This provides a kludge of getting at it.
35 */
36
37#undef errno
38extern int errno;
39int host_errno(void)
40{
41    return errno;
42}
43
Note: See TracBrowser for help on using the repository browser.