blob: 1e822f108cc5b2b5b4d8554084b2172f40a6ac65 [file] [log] [blame]
/* errno.c -- functions for getting and setting errno
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <errno.h>
#include <stdint.h>
#include "runtime.h"
/* errno is typically a macro. These functions set
and get errno specific to the libc being used. */
uintptr_t GetErrno(void) __asm__ (GOSYM_PREFIX "syscall.GetErrno");
void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
return (uintptr_t) errno;
SetErrno(uintptr_t value)
errno = (int) value;