- 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
This commit is contained in:
Oliver Tappe 2004-11-10 19:25:29 +00:00
parent bdd5913945
commit f32abcdce8

View File

@ -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 <Errors.h>
#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_ */