From bb3353a27218569720f711dc6ad6b25927440182 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 9 Jun 2018 07:40:07 +0200 Subject: [PATCH] mescc: Silence some stubs. * lib/libc+tcc.c: [!NOISY_FLOATS, !NOISY_TIMES]: Silence stubs. * lib/gcc.c: Likewise. * lib/binutils.c: Likewise. --- include/limits.h | 1 + lib/binutils.c | 6 ++++++ lib/gcc.c | 2 ++ lib/libc+tcc-gcc.c | 10 ++++++++++ lib/libc+tcc.c | 9 +++++++++ 5 files changed, 28 insertions(+) diff --git a/include/limits.h b/include/limits.h index 0a33da16..87066fba 100644 --- a/include/limits.h +++ b/include/limits.h @@ -31,6 +31,7 @@ #define CHAR_BIT 8 #define UCHAR_MAX 255 +#define UINT_MAX 4294967295U #define INT_MIN -2147483648 #define INT_MAX 2147483647 #define MB_CUR_MAX 1 diff --git a/lib/binutils.c b/lib/binutils.c index a1729802..5f935dc6 100644 --- a/lib/binutils.c +++ b/lib/binutils.c @@ -40,7 +40,9 @@ chown (char const *file_name, uid_t owner, gid_t group) int ctime (int x) { +#if NOISY_TIMES eputs ("ctime stub\n"); +#endif return 0; } @@ -162,7 +164,9 @@ umask (int x) int utime (int x) { +#if NOISY_TIMES eputs ("utime stub\n"); +#endif return 0; } @@ -194,7 +198,9 @@ bsearch (void const *key, void const *array, size_t count, size_t size, comparis struct tm * gmtime (time_t const *time) { +#if NOISY_TIMES eputs ("gmtime stub\n"); +#endif return localtime (time); } diff --git a/lib/gcc.c b/lib/gcc.c index 7cca126a..9a8dd101 100644 --- a/lib/gcc.c +++ b/lib/gcc.c @@ -34,7 +34,9 @@ freopen (char const *file_name, char const *opentype, FILE *stream) clock_t times (struct tms *buffer) { +#if NOISY_TIMES eputs ("times stub\n"); +#endif return 0; } diff --git a/lib/libc+tcc-gcc.c b/lib/libc+tcc-gcc.c index 0716a2d4..3448a68b 100644 --- a/lib/libc+tcc-gcc.c +++ b/lib/libc+tcc-gcc.c @@ -112,34 +112,44 @@ __ashrdi3 (long long a, int b) long double __floatundixf (unsigned long long a) { +#if NOISY_FLOATS eputs ("__floatundix stub\n"); +#endif return 0; } unsigned long long __fixunsxfdi (double a1) { +#if NOISY_FLOATS eputs ("__fixunsxfdi stub\n"); +#endif return 0; } unsigned long long __fixdfdi (double a1) { +#if NOISY_FLOATS eputs ("__fixdfdi stub\n"); +#endif return 0; } unsigned long long __fixxfdi (double a1) { +#if NOISY_FLOATS eputs ("__fixxfdi stub\n"); +#endif return 0; } unsigned long long __fixsfdi (double a1) { +#if NOISY_FLOATS eputs ("__fixsfdi stub\n"); +#endif return 0; } diff --git a/lib/libc+tcc.c b/lib/libc+tcc.c index ff6b6819..cd51cdde 100644 --- a/lib/libc+tcc.c +++ b/lib/libc+tcc.c @@ -243,7 +243,9 @@ fseek (FILE *stream, long offset, int whence) int gettimeofday (struct timeval *tv, struct timezone *tz) { +#if NOISY_TIMES eputs ("gettimeofday stub\n"); +#endif return 0; } @@ -257,7 +259,9 @@ ldexp (double x, int exp) struct tm * localtime (time_t const *timep) { +#if NOISY_TIMES eputs ("localtime stub\n"); +#endif return 0; } @@ -478,7 +482,10 @@ strstr (char const *haystack, char const *needle) double strtod (char const *string, char **tailptr) { +#if NOISY_FLOATS eputs ("strtod stub\n"); +#endif + return 0; } float @@ -560,7 +567,9 @@ strtoull (char const *string, char **tailptr, int base) time_t time (time_t *tloc) { +#if NOISY_TIMES eputs ("time stub\n"); +#endif return 0; }