Initial commit of current C compiler sources, partly rebranded but not yet properly cleaned up!
This commit is contained in:
20
fakelibc/errno.h
Normal file
20
fakelibc/errno.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#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
|
Reference in New Issue
Block a user