1
0

libstdcxx-uclibc-c99.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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 2016-04-05 16:01:00.873639884 +0200
  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/cmath gcc-5.3.0/libstdc++-v3/include/c_global/cmath
  78. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cmath 2015-11-24 14:25:07.000000000 +0100
  79. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cmath 2016-04-05 22:51:12.105067127 +0200
  80. @@ -947,7 +947,7 @@
  81. #if __cplusplus >= 201103L
  82. -#ifdef _GLIBCXX_USE_C99_MATH_TR1
  83. +#if defined(_GLIBCXX_USE_C99_MATH_TR1) || defined(__UCLIBC__)
  84. #undef acosh
  85. #undef acoshf
  86. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdio gcc-5.3.0/libstdc++-v3/include/c_global/cstdio
  87. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdio 2015-02-01 16:11:08.000000000 +0100
  88. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cstdio 2016-04-05 16:01:00.873639884 +0200
  89. @@ -146,7 +146,7 @@
  90. using ::vsprintf;
  91. } // namespace
  92. -#if _GLIBCXX_USE_C99
  93. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  94. #undef snprintf
  95. #undef vfscanf
  96. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdlib gcc-5.3.0/libstdc++-v3/include/c_global/cstdlib
  97. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cstdlib 2015-01-05 13:33:28.000000000 +0100
  98. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cstdlib 2016-04-05 16:01:00.873639884 +0200
  99. @@ -195,7 +195,7 @@
  100. _GLIBCXX_END_NAMESPACE_VERSION
  101. } // namespace
  102. -#if _GLIBCXX_USE_C99
  103. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  104. #undef _Exit
  105. #undef llabs
  106. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_global/cwchar gcc-5.3.0/libstdc++-v3/include/c_global/cwchar
  107. --- gcc-5.3.0.orig/libstdc++-v3/include/c_global/cwchar 2015-01-05 13:33:28.000000000 +0100
  108. +++ gcc-5.3.0/libstdc++-v3/include/c_global/cwchar 2016-04-05 16:01:00.885640349 +0200
  109. @@ -232,7 +232,7 @@
  110. _GLIBCXX_END_NAMESPACE_VERSION
  111. } // namespace
  112. -#if _GLIBCXX_USE_C99
  113. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  114. #undef wcstold
  115. #undef wcstoll
  116. @@ -289,7 +289,7 @@
  117. using std::vwscanf;
  118. #endif
  119. -#if _GLIBCXX_USE_C99
  120. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  121. using std::wcstold;
  122. using std::wcstoll;
  123. using std::wcstoull;
  124. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdio gcc-5.3.0/libstdc++-v3/include/c_std/cstdio
  125. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdio 2015-02-01 16:11:08.000000000 +0100
  126. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cstdio 2016-04-05 16:01:00.885640349 +0200
  127. @@ -144,7 +144,7 @@
  128. using ::vsprintf;
  129. } // namespace std
  130. -#if _GLIBCXX_USE_C99
  131. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  132. #undef snprintf
  133. #undef vfscanf
  134. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdlib gcc-5.3.0/libstdc++-v3/include/c_std/cstdlib
  135. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cstdlib 2015-01-05 13:33:28.000000000 +0100
  136. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cstdlib 2016-04-05 16:01:00.885640349 +0200
  137. @@ -192,7 +192,7 @@
  138. _GLIBCXX_END_NAMESPACE_VERSION
  139. } // namespace
  140. -#if _GLIBCXX_USE_C99
  141. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  142. #undef _Exit
  143. #undef llabs
  144. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/c_std/cwchar gcc-5.3.0/libstdc++-v3/include/c_std/cwchar
  145. --- gcc-5.3.0.orig/libstdc++-v3/include/c_std/cwchar 2015-01-05 13:33:28.000000000 +0100
  146. +++ gcc-5.3.0/libstdc++-v3/include/c_std/cwchar 2016-04-05 16:01:00.889640505 +0200
  147. @@ -228,7 +228,7 @@
  148. _GLIBCXX_END_NAMESPACE_VERSION
  149. } // namespace
  150. -#if _GLIBCXX_USE_C99
  151. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  152. #undef wcstold
  153. #undef wcstoll
  154. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/ext/vstring.h gcc-5.3.0/libstdc++-v3/include/ext/vstring.h
  155. --- gcc-5.3.0.orig/libstdc++-v3/include/ext/vstring.h 2015-01-05 13:33:28.000000000 +0100
  156. +++ gcc-5.3.0/libstdc++-v3/include/ext/vstring.h 2016-04-05 16:01:00.889640505 +0200
  157. @@ -2680,7 +2680,7 @@
  158. _GLIBCXX_END_NAMESPACE_VERSION
  159. } // namespace
  160. -#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
  161. +#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
  162. #include <ext/string_conversions.h>
  163. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cmath gcc-5.3.0/libstdc++-v3/include/tr1/cmath
  164. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cmath 2015-11-24 14:25:07.000000000 +0100
  165. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cmath 2016-04-05 16:01:54.523720108 +0200
  166. @@ -33,7 +33,7 @@
  167. #include <cmath>
  168. -#ifdef _GLIBCXX_USE_C99_MATH_TR1
  169. +#if defined(_GLIBCXX_USE_C99_MATH_TR1) || defined(__UCLIBC__)
  170. #undef acosh
  171. #undef acoshf
  172. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdio gcc-5.3.0/libstdc++-v3/include/tr1/cstdio
  173. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdio 2015-01-05 13:33:28.000000000 +0100
  174. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cstdio 2016-04-05 16:01:00.889640505 +0200
  175. @@ -33,7 +33,7 @@
  176. #include <cstdio>
  177. -#if _GLIBCXX_USE_C99
  178. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  179. namespace std _GLIBCXX_VISIBILITY(default)
  180. {
  181. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdlib gcc-5.3.0/libstdc++-v3/include/tr1/cstdlib
  182. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cstdlib 2015-01-05 13:33:28.000000000 +0100
  183. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cstdlib 2016-04-05 16:01:00.889640505 +0200
  184. @@ -35,7 +35,7 @@
  185. #if _GLIBCXX_HOSTED
  186. -#if _GLIBCXX_USE_C99
  187. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  188. namespace std _GLIBCXX_VISIBILITY(default)
  189. {
  190. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/cwchar gcc-5.3.0/libstdc++-v3/include/tr1/cwchar
  191. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/cwchar 2015-01-05 13:33:28.000000000 +0100
  192. +++ gcc-5.3.0/libstdc++-v3/include/tr1/cwchar 2016-04-05 16:01:00.889640505 +0200
  193. @@ -52,7 +52,7 @@
  194. using std::vwscanf;
  195. #endif
  196. -#if _GLIBCXX_USE_C99
  197. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  198. using std::wcstold;
  199. using std::wcstoll;
  200. using std::wcstoull;
  201. diff -Nur gcc-5.3.0.orig/libstdc++-v3/include/tr1/stdlib.h gcc-5.3.0/libstdc++-v3/include/tr1/stdlib.h
  202. --- gcc-5.3.0.orig/libstdc++-v3/include/tr1/stdlib.h 2015-01-05 13:33:28.000000000 +0100
  203. +++ gcc-5.3.0/libstdc++-v3/include/tr1/stdlib.h 2016-04-05 16:01:00.889640505 +0200
  204. @@ -33,7 +33,7 @@
  205. #if _GLIBCXX_HOSTED
  206. -#if _GLIBCXX_USE_C99
  207. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  208. using std::tr1::atoll;
  209. using std::tr1::strtoll;
  210. 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
  211. --- gcc-5.3.0.orig/libstdc++-v3/src/c++11/debug.cc 2015-01-05 13:33:28.000000000 +0100
  212. +++ gcc-5.3.0/libstdc++-v3/src/c++11/debug.cc 2016-04-05 16:01:00.889640505 +0200
  213. @@ -788,7 +788,7 @@
  214. int __n __attribute__ ((__unused__)),
  215. const char* __fmt, _Tp __s) const throw ()
  216. {
  217. -#ifdef _GLIBCXX_USE_C99
  218. +#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
  219. std::snprintf(__buf, __n, __fmt, __s);
  220. #else
  221. std::sprintf(__buf, __fmt, __s);