diff options
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | include/time.h | 2 | ||||
-rw-r--r-- | include/values.h | 2 | ||||
-rw-r--r-- | include/wchar.h | 6 |
4 files changed, 22 insertions, 0 deletions
@@ -182,6 +182,14 @@ install_dev: install -d $(PREFIX)$(DEVEL_PREFIX)/include -install -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)/lib/ tar -chf - include | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX); +ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y) + # Remove floating point related headers since float support is disabled. + rm $(PREFIX)$(DEVEL_PREFIX)/include/complex.h + rm $(PREFIX)$(DEVEL_PREFIX)/include/fpu_control.h + rm $(PREFIX)$(DEVEL_PREFIX)/include/ieee754.h + rm $(PREFIX)$(DEVEL_PREFIX)/include/math.h + rm $(PREFIX)$(DEVEL_PREFIX)/include/tgmath.h +endif ifneq ($(strip $(UCLIBC_HAS_WCHAR)),y) # Remove wide char headers since wide char support is disabled. rm $(PREFIX)$(DEVEL_PREFIX)/include/wctype.h @@ -191,6 +199,10 @@ ifneq ($(strip $(UCLIBC_HAS_LOCALE)),y) # Remove iconv header since locale support is disabled. rm $(PREFIX)$(DEVEL_PREFIX)/include/iconv.h endif +ifneq ($(strip $(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF)),y) + # Remove printf header since custom print specifier support is disabled. + rm $(PREFIX)$(DEVEL_PREFIX)/include/printf.h +endif ifneq ($(strip $(UCLIBC_HAS_XLOCALE)),y) # Remove xlocale header since extended locale support is disabled. rm $(PREFIX)$(DEVEL_PREFIX)/include/xlocale.h diff --git a/include/time.h b/include/time.h index d2ae86328..782913e4b 100644 --- a/include/time.h +++ b/include/time.h @@ -186,9 +186,11 @@ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; +#ifdef __UCLIBC_HAS_FLOATS__ /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); +#endif /* __UCLIBC_HAS_FLOATS__ */ /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; diff --git a/include/values.h b/include/values.h index c8b376f18..d8bd8b50a 100644 --- a/include/values.h +++ b/include/values.h @@ -49,6 +49,7 @@ #define HIBITL MINLONG +#ifdef __UCLIBC_HAS_FLOATS__ #include <float.h> #define MAXDOUBLE DBL_MAX @@ -59,6 +60,7 @@ #define FMINEXP FLT_MIN_EXP #define DMAXEXP DBL_MAX_EXP #define FMAXEXP FLT_MAX_EXP +#endif /* __UCLIBC_HAS_FLOATS__ */ #ifdef __USE_MISC diff --git a/include/wchar.h b/include/wchar.h index 09ab741ae..ecb6c2cd9 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -394,6 +394,7 @@ extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW; __BEGIN_NAMESPACE_C99 +#ifdef __UCLIBC_HAS_FLOATS__ /* Convert initial portion of the wide string NPTR to `double' representation. */ extern double wcstod (__const wchar_t *__restrict __nptr, @@ -406,6 +407,7 @@ extern float wcstof (__const wchar_t *__restrict __nptr, extern long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ +#endif /* __UCLIBC_HAS_FLOATS__ */ /* Convert initial portion of wide string NPTR to `long int' @@ -505,6 +507,7 @@ extern unsigned long long int __wcstoull_l (__const wchar_t *__restrict __nptr, int __base, __locale_t __loc) __THROW; +#ifdef __UCLIBC_HAS_FLOATS__ extern double wcstod_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; @@ -525,11 +528,13 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr, extern long double __wcstold_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; +#endif /* __UCLIBC_HAS_FLOATS__ */ #endif /* __UCLIBC_HAS_XLOCALE__ */ #endif /* GNU */ #if 0 +#ifdef __UCLIBC_HAS_FLOATS__ /* The internal entry points for `wcstoX' take an extra flag argument saying whether or not to parse locale-dependent number grouping. */ extern double __wcstod_internal (__const wchar_t *__restrict __nptr, @@ -541,6 +546,7 @@ extern float __wcstof_internal (__const wchar_t *__restrict __nptr, extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) __THROW; +#endif /* __UCLIBC_HAS_FLOATS__ */ #ifndef __wcstol_internal_defined extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, |