IIRC, this makes some functions accidentally work "more incorrectly",
but at least it appears to make times() not hang.
#include <errno.h>
#include <stdio.h>
-/* XXX: incorrect return value, need to fix other things first */
#define STUB_ERRNO(name) \
int name(void); int name(void) { \
static int done = 0; \
errno = ENOTSUP; \
- if (done) return ENOTSUP; done = 1; \
+ if (done) return -1; done = 1; \
fprintf(stderr, "STUB ``%s'' called\n", #name); \
- return ENOTSUP;}
+ return -1;}
#define STUB_RETURN(name) \
int name(void); int name(void) { \