Set ENOSYS for all libc dummies

This is a brute-force approach to issue #102. This might be a bit too
much. I don't know if we can clobber errno for all of those?
This commit is contained in:
Julian Stecklina 2012-02-08 23:37:54 +01:00 committed by Norman Feske
parent 9508cc0ed5
commit c7890c9423
1 changed files with 7 additions and 2 deletions

View File

@ -13,13 +13,18 @@
#include <base/printf.h>
#include <stddef.h>
#include <errno.h>
extern "C" {
typedef long DUMMY;
#define DUMMY(retval, name) __attribute__((weak)) \
DUMMY name(void) { PDBG( #name " called, not implemented"); return retval; }
#define DUMMY(retval, name) __attribute__((weak)) \
DUMMY name(void) { \
PDBG( #name " called, not implemented"); \
errno = ENOSYS; \
return retval; \
}
DUMMY(-1, access)
DUMMY(-1, chmod)