901-avr32-revert-broken-uclibc-stuff.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- a/libstdc++-v3/acinclude.m4
  2. +++ b/libstdc++-v3/acinclude.m4
  3. @@ -125,6 +125,15 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
  4. ## other macros from doing the same. This should be automated.) -pme
  5. need_libmath=no
  6. + # Check for uClibc since Linux platforms use different configuration
  7. + # directories depending on the C library in use.
  8. + AC_EGREP_CPP([_using_uclibc], [
  9. + #include <stdio.h>
  10. + #if __UCLIBC__
  11. + _using_uclibc
  12. + #endif
  13. + ], uclibc=yes, uclibc=no)
  14. +
  15. # Find platform-specific directories containing configuration info.
  16. # Also possibly modify flags used elsewhere, as needed by the platform.
  17. GLIBCXX_CHECK_HOST
  18. --- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
  19. +++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
  20. @@ -31,8 +31,6 @@
  21. //
  22. // ISO C++ 14882: 22.1 Locales
  23. //
  24. -#include <features.h>
  25. -#include <ctype.h>
  26. /** @file ctype_base.h
  27. * This is an internal header file, included by other library headers.
  28. @@ -47,11 +45,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
  29. struct ctype_base
  30. {
  31. // Non-standard typedefs.
  32. -#ifdef __UCLIBC__
  33. - typedef const __ctype_touplow_t* __to_type;
  34. -#else
  35. - typedef const int* __to_type;
  36. -#endif
  37. + typedef const int* __to_type;
  38. // NB: Offsets into ctype<char>::_M_table force a particular size
  39. // on the mask type. Because of this, we don't use an enum.