diff --git a/lib/binutils.c b/lib/binutils.c index 5f935dc6..102bed10 100644 --- a/lib/binutils.c +++ b/lib/binutils.c @@ -34,6 +34,7 @@ int chown (char const *file_name, uid_t owner, gid_t group) { eputs ("chown stub\n"); + errno = 0; return 0; } @@ -43,6 +44,7 @@ ctime (int x) #if NOISY_TIMES eputs ("ctime stub\n"); #endif + errno = 0; return 0; } @@ -96,6 +98,7 @@ int sigsetmask (int x) { eputs ("sigsetmask stub\n"); + errno = 0; return 0; } @@ -151,6 +154,7 @@ int sys_siglist (int x) { eputs ("sys_siglist stub\n"); + errno = 0; return 0; } @@ -158,6 +162,7 @@ int umask (int x) { eputs ("umask stub\n"); + errno = 0; return 0; } @@ -167,6 +172,7 @@ utime (int x) #if NOISY_TIMES eputs ("utime stub\n"); #endif + errno = 0; return 0; } @@ -201,6 +207,7 @@ gmtime (time_t const *time) #if NOISY_TIMES eputs ("gmtime stub\n"); #endif + errno = 0; return localtime (time); } diff --git a/lib/gcc.c b/lib/gcc.c index 9a8dd101..c8eeb9e6 100644 --- a/lib/gcc.c +++ b/lib/gcc.c @@ -113,5 +113,6 @@ struct passwd * getpwnam (const char *NAME) { eputs ("getpwnam stub\n"); + errno = 0; return 0; } diff --git a/lib/libc+tcc.c b/lib/libc+tcc.c index cd51cdde..8355f236 100644 --- a/lib/libc+tcc.c +++ b/lib/libc+tcc.c @@ -246,6 +246,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz) #if NOISY_TIMES eputs ("gettimeofday stub\n"); #endif + errno = 0; return 0; } @@ -262,6 +263,7 @@ localtime (time_t const *timep) #if NOISY_TIMES eputs ("localtime stub\n"); #endif + errno = 0; return 0; } @@ -570,6 +572,7 @@ time (time_t *tloc) #if NOISY_TIMES eputs ("time stub\n"); #endif + errno = 0; return 0; } diff --git a/lib/m4.c b/lib/m4.c index 1e13fe8e..1c9bcfb9 100644 --- a/lib/m4.c +++ b/lib/m4.c @@ -66,6 +66,7 @@ int fpurge (FILE *stream) { eputs ("fpurge stub\n"); + errno = 0; return 0; } @@ -73,6 +74,7 @@ size_t freadahead (FILE *fp) { eputs ("freadahead stub\n"); + errno = 0; return 0; } @@ -130,6 +132,7 @@ int pclose (int x) { eputs ("pclose stub\n"); + errno = 0; return 0; } @@ -137,6 +140,7 @@ int popen (int x) { eputs ("popen stub\n"); + errno = 0; return 0; } @@ -150,6 +154,7 @@ int rewind (int x) { eputs ("rewind stub\n"); + errno = 0; return 0; } @@ -157,6 +162,7 @@ int setbuf (int x) { eputs ("setbuf stub\n"); + errno = 0; return 0; } @@ -164,6 +170,7 @@ int system (int x) { eputs ("system stub\n"); + errno = 0; return 0; }