libstdcxx-uclibc-c99.patch 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. diff -Nur gcc-5.3.0.orig/libstdc++-v3/config/locale/generic/c_locale.h gcc-5.3.0/libstdc++-v3/config/locale/generic/c_locale.h
  2. --- gcc-5.3.0.orig/libstdc++-v3/config/locale/generic/c_locale.h 2015-01-05 13:33:28.000000000 +0100
  3. +++ gcc-5.3.0/libstdc++-v3/config/locale/generic/c_locale.h 2015-12-06 09:10:01.383992311 +0100
  4. @@ -70,7 +70,7 @@
  5. __builtin_va_list __args;
  6. __builtin_va_start(__args, __fmt);
  7. -#ifdef _GLIBCXX_USE_C99
  8. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  9. const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
  10. #else
  11. const int __ret = __builtin_vsprintf(__out, __fmt, __args);
  12. diff -Nur gcc-5.3.0.orig/libstdc++-v3/config/locale/gnu/c_locale.h gcc-5.3.0/libstdc++-v3/config/locale/gnu/c_locale.h
  13. --- gcc-5.3.0.orig/libstdc++-v3/config/locale/gnu/c_locale.h 2015-01-05 13:33:28.000000000 +0100
  14. +++ gcc-5.3.0/libstdc++-v3/config/locale/gnu/c_locale.h 2015-12-06 09:10:01.383992311 +0100
  15. @@ -88,7 +88,7 @@
  16. __builtin_va_list __args;
  17. __builtin_va_start(__args, __fmt);
  18. -#ifdef _GLIBCXX_USE_C99
  19. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  20. const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
  21. #else
  22. const int __ret = __builtin_vsprintf(__out, __fmt, __args);
  23. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/bits/basic_string.h gcc-5.3.0/libstdc++-v3/include/bits/basic_string.h
  24. --- gcc-5.3.0.orig/libstdc++-v3/include/bits/basic_string.h 2015-11-25 17:11:33.000000000 +0100
  25. +++ gcc-5.3.0/libstdc++-v3/include/bits/basic_string.h 2015-12-06 09:10:01.383992311 +0100
  26. @@ -5246,7 +5246,7 @@
  27. _GLIBCXX_END_NAMESPACE_VERSION
  28. } // namespace
  29. -#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
  30. +#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
  31. #include <ext/string_conversions.h>
  32. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc gcc-5.3.0/libstdc++-v3/include/bits/locale_facets_nonio.tcc
  33. --- gcc-5.3.0.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2015-01-05 13:33:28.000000000 +0100
  34. +++ gcc-5.3.0/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2015-12-06 09:10:01.383992311 +0100
  35. @@ -578,7 +578,7 @@
  36. {
  37. const locale __loc = __io.getloc();
  38. const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
  39. -#ifdef _GLIBCXX_USE_C99
  40. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  41. // First try a buffer perhaps big enough.
  42. int __cs_size = 64;
  43. char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
  44. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/bits/locale_facets.tcc gcc-5.3.0/libstdc++-v3/include/bits/locale_facets.tcc
  45. --- gcc-5.3.0.orig/libstdc++-v3/include/bits/locale_facets.tcc 2015-01-05 13:33:28.000000000 +0100
  46. +++ gcc-5.3.0/libstdc++-v3/include/bits/locale_facets.tcc 2015-12-06 09:10:32.189186155 +0100
  47. @@ -992,7 +992,7 @@
  48. char __fbuf[16];
  49. __num_base::_S_format_float(__io, __fbuf, __mod);
  50. -#ifdef _GLIBCXX_USE_C99
  51. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  52. // Precision is always used except for hexfloat format.
  53. const bool __use_prec =
  54. (__io.flags() & ios_base::floatfield) != ios_base::floatfield;
  55. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_compatibility/math.h gcc-5.3.0/libstdc++-v3/include/c_compatibility/math.h
  56. --- gcc-5.3.0.orig/libstdc++-v3/include/c_compatibility/math.h 2015-01-05 13:33:28.000000000 +0100
  57. +++ gcc-5.3.0/libstdc++-v3/include/c_compatibility/math.h 2015-12-06 09:10:01.383992311 +0100
  58. @@ -56,7 +56,7 @@
  59. using std::floor;
  60. using std::fmod;
  61. -#if _GLIBCXX_USE_C99
  62. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  63. using std::fpclassify;
  64. using std::isfinite;
  65. using std::isinf;
  66. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_compatibility/wchar.h gcc-5.3.0/libstdc++-v3/include/c_compatibility/wchar.h
  67. --- gcc-5.3.0.orig/libstdc++-v3/include/c_compatibility/wchar.h 2015-01-05 13:33:28.000000000 +0100
  68. +++ gcc-5.3.0/libstdc++-v3/include/c_compatibility/wchar.h 2015-12-06 09:10:01.383992311 +0100
  69. @@ -103,7 +103,7 @@
  70. using std::wmemset;
  71. using std::wcsftime;
  72. -#if _GLIBCXX_USE_C99
  73. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  74. using std::wcstold;
  75. using std::wcstoll;
  76. using std::wcstoull;
  77. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdio gcc-5.3.0/libstdc++-v3/include/c_global/cstdio
  78. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdio 2015-02-01 16:11:08.000000000 +0100
  79. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cstdio 2015-12-06 09:10:01.383992311 +0100
  80. @@ -146,7 +146,7 @@
  81. using ::vsprintf;
  82. } // namespace
  83. -#if _GLIBCXX_USE_C99
  84. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  85. #undef snprintf
  86. #undef vfscanf
  87. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdlib gcc-5.3.0/libstdc++-v3/include/c_global/cstdlib
  88. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdlib 2015-01-05 13:33:28.000000000 +0100
  89. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cstdlib 2015-12-06 09:10:01.383992311 +0100
  90. @@ -195,7 +195,7 @@
  91. _GLIBCXX_END_NAMESPACE_VERSION
  92. } // namespace
  93. -#if _GLIBCXX_USE_C99
  94. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  95. #undef _Exit
  96. #undef llabs
  97. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cwchar gcc-5.3.0/libstdc++-v3/include/c_global/cwchar
  98. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cwchar 2015-01-05 13:33:28.000000000 +0100
  99. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cwchar 2015-12-06 09:10:01.383992311 +0100
  100. @@ -232,7 +232,7 @@
  101. _GLIBCXX_END_NAMESPACE_VERSION
  102. } // namespace
  103. -#if _GLIBCXX_USE_C99
  104. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  105. #undef wcstold
  106. #undef wcstoll
  107. @@ -289,7 +289,7 @@
  108. using std::vwscanf;
  109. #endif
  110. -#if _GLIBCXX_USE_C99
  111. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  112. using std::wcstold;
  113. using std::wcstoll;
  114. using std::wcstoull;
  115. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdio gcc-5.3.0/libstdc++-v3/include/c_std/cstdio
  116. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdio 2015-02-01 16:11:08.000000000 +0100
  117. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cstdio 2015-12-06 09:10:01.383992311 +0100
  118. @@ -144,7 +144,7 @@
  119. using ::vsprintf;
  120. } // namespace std
  121. -#if _GLIBCXX_USE_C99
  122. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  123. #undef snprintf
  124. #undef vfscanf
  125. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdlib gcc-5.3.0/libstdc++-v3/include/c_std/cstdlib
  126. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdlib 2015-01-05 13:33:28.000000000 +0100
  127. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cstdlib 2015-12-06 09:10:01.383992311 +0100
  128. @@ -192,7 +192,7 @@
  129. _GLIBCXX_END_NAMESPACE_VERSION
  130. } // namespace
  131. -#if _GLIBCXX_USE_C99
  132. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  133. #undef _Exit
  134. #undef llabs
  135. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cwchar gcc-5.3.0/libstdc++-v3/include/c_std/cwchar
  136. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cwchar 2015-01-05 13:33:28.000000000 +0100
  137. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cwchar 2015-12-06 09:10:01.383992311 +0100
  138. @@ -228,7 +228,7 @@
  139. _GLIBCXX_END_NAMESPACE_VERSION
  140. } // namespace
  141. -#if _GLIBCXX_USE_C99
  142. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  143. #undef wcstold
  144. #undef wcstoll
  145. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/ext/vstring.h gcc-5.3.0/libstdc++-v3/include/ext/vstring.h
  146. --- gcc-5.3.0.orig/libstdc++-v3/include/ext/vstring.h 2015-01-05 13:33:28.000000000 +0100
  147. +++ gcc-5.3.0/libstdc++-v3/include/ext/vstring.h 2015-12-06 09:10:01.387992466 +0100
  148. @@ -2680,7 +2680,7 @@
  149. _GLIBCXX_END_NAMESPACE_VERSION
  150. } // namespace
  151. -#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
  152. +#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
  153. #include <ext/string_conversions.h>
  154. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdio gcc-5.3.0/libstdc++-v3/include/tr1/cstdio
  155. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdio 2015-01-05 13:33:28.000000000 +0100
  156. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cstdio 2015-12-06 09:10:01.395992777 +0100
  157. @@ -33,7 +33,7 @@
  158. #include <cstdio>
  159. -#if _GLIBCXX_USE_C99
  160. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  161. namespace std _GLIBCXX_VISIBILITY(default)
  162. {
  163. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdlib gcc-5.3.0/libstdc++-v3/include/tr1/cstdlib
  164. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdlib 2015-01-05 13:33:28.000000000 +0100
  165. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cstdlib 2015-12-06 09:10:01.395992777 +0100
  166. @@ -35,7 +35,7 @@
  167. #if _GLIBCXX_HOSTED
  168. -#if _GLIBCXX_USE_C99
  169. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  170. namespace std _GLIBCXX_VISIBILITY(default)
  171. {
  172. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cwchar gcc-5.3.0/libstdc++-v3/include/tr1/cwchar
  173. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cwchar 2015-01-05 13:33:28.000000000 +0100
  174. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cwchar 2015-12-06 09:10:01.395992777 +0100
  175. @@ -52,7 +52,7 @@
  176. using std::vwscanf;
  177. #endif
  178. -#if _GLIBCXX_USE_C99
  179. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  180. using std::wcstold;
  181. using std::wcstoll;
  182. using std::wcstoull;
  183. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/stdlib.h gcc-5.3.0/libstdc++-v3/include/tr1/stdlib.h
  184. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/stdlib.h 2015-01-05 13:33:28.000000000 +0100
  185. +++ gcc-5.3.0/libstdc++-v3/include/tr1/stdlib.h 2015-12-06 09:10:01.395992777 +0100
  186. @@ -33,7 +33,7 @@
  187. #if _GLIBCXX_HOSTED
  188. -#if _GLIBCXX_USE_C99
  189. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  190. using std::tr1::atoll;
  191. using std::tr1::strtoll;
  192. diff -Nur gcc-5.3.0.orig/libstdc++-v3/src/c++11/debug.cc gcc-5.3.0/libstdc++-v3/src/c++11/debug.cc
  193. --- gcc-5.3.0.orig/libstdc++-v3/src/c++11/debug.cc 2015-01-05 13:33:28.000000000 +0100
  194. +++ gcc-5.3.0/libstdc++-v3/src/c++11/debug.cc 2015-12-06 09:10:01.395992777 +0100
  195. @@ -788,7 +788,7 @@
  196. int __n __attribute__ ((__unused__)),
  197. const char* __fmt, _Tp __s) const throw ()
  198. {
  199. -#ifdef _GLIBCXX_USE_C99
  200. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  201. std::snprintf(__buf, __n, __fmt, __s);
  202. #else
  203. std::sprintf(__buf, __fmt, __s);