21 lines
394 B
C
21 lines
394 B
C
|
#ifndef _FAKELIBC_ERRNO_H
|
||
|
#define _FAKELIBC_ERRNO_H
|
||
|
|
||
|
//extern int errno;
|
||
|
|
||
|
/* On modern Linux platforms the errno is simulated. This is presumably so that each
|
||
|
* thread can have it's own errno without the ABI becoming a huge mess.
|
||
|
*/
|
||
|
#ifdef __MAC
|
||
|
int errno;
|
||
|
#else
|
||
|
int* __errno_location();
|
||
|
|
||
|
#define errno __errno_location()[0]
|
||
|
#endif
|
||
|
|
||
|
#define ENOENT 2
|
||
|
|
||
|
/* From ifndef at top of file: */
|
||
|
#endif
|