Avoid is_constant calls in vectorizable_bswap
[official-gcc.git] / libgo / go / syscall / errno.c
blob1e822f108cc5b2b5b4d8554084b2172f40a6ac65
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. */
6 #include <errno.h>
7 #include <stdint.h>
9 #include "runtime.h"
11 /* errno is typically a macro. These functions set
12 and get errno specific to the libc being used. */
14 uintptr_t GetErrno(void) __asm__ (GOSYM_PREFIX "syscall.GetErrno");
15 void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
17 uintptr_t
18 GetErrno(void)
20 return (uintptr_t) errno;
23 void
24 SetErrno(uintptr_t value)
26 errno = (int) value;