ReactOS 0.4.15-dev-7788-g1ad9096
seterrno.c
Go to the documentation of this file.
1/* @(#)seterrno.c 1.13 10/08/23 Copyright 1985, 1995-2010 J. Schilling */
2/*
3 * Set error number
4 *
5 * Copyright (c) 1985, 1995-2010 J. Schilling
6 */
7/*
8 * The contents of this file are subject to the terms of the
9 * Common Development and Distribution License, Version 1.0 only
10 * (the "License"). You may not use this file except in compliance
11 * with the License.
12 *
13 * See the file CDDL.Schily.txt in this distribution for details.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file CDDL.Schily.txt from this distribution.
17 */
18
19#ifndef _TS_ERRNO
20#define _TS_ERRNO /* Solaris: get thread safe errno value */
21#endif
22#ifndef _LIBC_REENTRANT
23#define _LIBC_REENTRANT /* Linux: get thread safe errno value */
24#endif
25#include <schily/standard.h>
26#include <schily/errno.h>
27#include <schily/schily.h>
28
29#ifdef seterrno
30#undef seterrno
31#endif
32
33EXPORT int
35 int err;
36{
37 int old = errno;
38
39 errno = err;
40 return (old);
41}
#define err(...)
#define errno
Definition: errno.h:18
EXPORT int seterrno(int err)
Definition: seterrno.c:34