mescc: Support binutils-2.10.1: Stubs set errno to 0.

This commit is contained in:
Jan Nieuwenhuizen 2018-06-09 11:28:31 +02:00
parent bb3353a272
commit 53dd76ffc0
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
4 changed files with 18 additions and 0 deletions

View file

@ -34,6 +34,7 @@ int
chown (char const *file_name, uid_t owner, gid_t group) chown (char const *file_name, uid_t owner, gid_t group)
{ {
eputs ("chown stub\n"); eputs ("chown stub\n");
errno = 0;
return 0; return 0;
} }
@ -43,6 +44,7 @@ ctime (int x)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("ctime stub\n"); eputs ("ctime stub\n");
#endif #endif
errno = 0;
return 0; return 0;
} }
@ -96,6 +98,7 @@ int
sigsetmask (int x) sigsetmask (int x)
{ {
eputs ("sigsetmask stub\n"); eputs ("sigsetmask stub\n");
errno = 0;
return 0; return 0;
} }
@ -151,6 +154,7 @@ int
sys_siglist (int x) sys_siglist (int x)
{ {
eputs ("sys_siglist stub\n"); eputs ("sys_siglist stub\n");
errno = 0;
return 0; return 0;
} }
@ -158,6 +162,7 @@ int
umask (int x) umask (int x)
{ {
eputs ("umask stub\n"); eputs ("umask stub\n");
errno = 0;
return 0; return 0;
} }
@ -167,6 +172,7 @@ utime (int x)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("utime stub\n"); eputs ("utime stub\n");
#endif #endif
errno = 0;
return 0; return 0;
} }
@ -201,6 +207,7 @@ gmtime (time_t const *time)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("gmtime stub\n"); eputs ("gmtime stub\n");
#endif #endif
errno = 0;
return localtime (time); return localtime (time);
} }

View file

@ -113,5 +113,6 @@ struct passwd *
getpwnam (const char *NAME) getpwnam (const char *NAME)
{ {
eputs ("getpwnam stub\n"); eputs ("getpwnam stub\n");
errno = 0;
return 0; return 0;
} }

View file

@ -246,6 +246,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("gettimeofday stub\n"); eputs ("gettimeofday stub\n");
#endif #endif
errno = 0;
return 0; return 0;
} }
@ -262,6 +263,7 @@ localtime (time_t const *timep)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("localtime stub\n"); eputs ("localtime stub\n");
#endif #endif
errno = 0;
return 0; return 0;
} }
@ -570,6 +572,7 @@ time (time_t *tloc)
#if NOISY_TIMES #if NOISY_TIMES
eputs ("time stub\n"); eputs ("time stub\n");
#endif #endif
errno = 0;
return 0; return 0;
} }

View file

@ -66,6 +66,7 @@ int
fpurge (FILE *stream) fpurge (FILE *stream)
{ {
eputs ("fpurge stub\n"); eputs ("fpurge stub\n");
errno = 0;
return 0; return 0;
} }
@ -73,6 +74,7 @@ size_t
freadahead (FILE *fp) freadahead (FILE *fp)
{ {
eputs ("freadahead stub\n"); eputs ("freadahead stub\n");
errno = 0;
return 0; return 0;
} }
@ -130,6 +132,7 @@ int
pclose (int x) pclose (int x)
{ {
eputs ("pclose stub\n"); eputs ("pclose stub\n");
errno = 0;
return 0; return 0;
} }
@ -137,6 +140,7 @@ int
popen (int x) popen (int x)
{ {
eputs ("popen stub\n"); eputs ("popen stub\n");
errno = 0;
return 0; return 0;
} }
@ -150,6 +154,7 @@ int
rewind (int x) rewind (int x)
{ {
eputs ("rewind stub\n"); eputs ("rewind stub\n");
errno = 0;
return 0; return 0;
} }
@ -157,6 +162,7 @@ int
setbuf (int x) setbuf (int x)
{ {
eputs ("setbuf stub\n"); eputs ("setbuf stub\n");
errno = 0;
return 0; return 0;
} }
@ -164,6 +170,7 @@ int
system (int x) system (int x)
{ {
eputs ("system stub\n"); eputs ("system stub\n");
errno = 0;
return 0; return 0;
} }