From f32abcdce874e0516573f974c395b12702130975 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 10 Nov 2004 19:25:29 +0000 Subject: [PATCH] - added haiku-specific implementation of bits/errno.h, as required by the stdlib-part of glibc. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9899 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../libroot/posix/glibc/include/bits/errno.h | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/kernel/libroot/posix/glibc/include/bits/errno.h diff --git a/src/kernel/libroot/posix/glibc/include/bits/errno.h b/src/kernel/libroot/posix/glibc/include/bits/errno.h new file mode 100644 index 0000000000..2881ad513f --- /dev/null +++ b/src/kernel/libroot/posix/glibc/include/bits/errno.h @@ -0,0 +1,32 @@ +/* +** Copyright 2004, Oliver Tappe. All rights reserved. +** Distributed under the terms of the Haiku License. +** +** This file represents a haiku-specific implementation of errno.h. +** It's main purpose is to define the E_...-error constants. +** In a full glibc-setup, this file would live under sysdeps, but since +** we do not have/need this abstraction, I placed it here. +*/ + +#ifndef _ERRNO_H_ +#define _ERRNO_H_ + +#include + +#define ENOERR 0 +#define EOK ENOERR /* some code assumes EOK exists */ + +#ifdef __cplusplus +extern "C" { +#endif + +extern int *_errnop(void); + +#ifdef __cplusplus +} +#endif + +#define errno (*(_errnop())) + +#endif /* _ERRNO_H_ */ +