libcpp/ChangeLog.pph
[official-gcc.git] / libgo / syscalls / errno.c
blob34771a0d83104c4e7850a01a92fc30b84349bda6
1 /* errno.c -- functions for getting and setting errno
3 Copyright 2010 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #include <errno.h>
9 /* errno is typically a macro. These functions set
10 and get errno specific to the libc being used. */
12 int GetErrno() asm ("libgo_syscalls.syscall.GetErrno");
13 void SetErrno(int) asm ("libgo_syscalls.syscall.SetErrno");
15 int
16 GetErrno()
18 return errno;
21 void
22 SetErrno(int value)
24 errno = value;