1/* 2 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6#include "compatibility.h" 7 8#include "fssh_errno.h" 9 10#include <errno.h> 11 12 13int * 14_fssh_errnop(void) 15{ 16 return &errno; 17} 18 19 20int 21fssh_get_errno(void) 22{ 23 return errno; 24} 25 26 27void 28fssh_set_errno(int error) 29{ 30 errno = error; 31} 32 33int 34fssh_to_host_error(int error) 35{ 36 #if (defined(__BEOS__) || defined(__HAIKU__)) 37 return error; 38 #else 39 return _haiku_to_host_error(error); 40 #endif 41} 42