uClibc-0.9.30.1-c99-ldbl-math.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. Index: uClibc-0.9.30.1/libm/ldouble_wrappers.c
  2. ===================================================================
  3. --- uClibc-0.9.30.1/libm/ldouble_wrappers.c (revision 25552)
  4. +++ uClibc-0.9.30.1/libm/ldouble_wrappers.c (working copy)
  5. @@ -13,6 +13,16 @@
  6. #include "math.h"
  7. #include <complex.h>
  8. +#if defined __NO_LONG_DOUBLE_MATH
  9. +# define int_WRAPPER_C99(func) /* not needed */
  10. +# else
  11. +# define int_WRAPPER_C99(func) \
  12. +int func##l(long double x) \
  13. +{ \
  14. + return func((double) x); \
  15. +} \
  16. +libm_hidden_def(func##l)
  17. +#endif
  18. /* Implement the following, as defined by SuSv3 */
  19. #if 0
  20. @@ -543,46 +553,28 @@ long double truncl (long double x)
  21. #endif
  22. -#ifdef __DO_C99_MATH__
  23. +#if defined __DO_C99_MATH__
  24. #ifdef L_fpclassifyl
  25. -int __fpclassifyl (long double x)
  26. -{
  27. - return __fpclassify ( (double) x );
  28. -}
  29. -libm_hidden_def(__fpclassifyl)
  30. +int_WRAPPER_C99(__fpclassify)
  31. #endif
  32. #ifdef L_finitel
  33. -int __finitel (long double x)
  34. -{
  35. - return __finite ( (double)x );
  36. -}
  37. -libm_hidden_def(__finitel)
  38. +int_WRAPPER_C99(__finite)
  39. #endif
  40. #ifdef L_signbitl
  41. -int __signbitl (long double x)
  42. -{
  43. - return __signbitl ( (double)x );
  44. -}
  45. -libm_hidden_def(__signbitl)
  46. +int_WRAPPER_C99(__signbit)
  47. #endif
  48. #ifdef L_isnanl
  49. -int __isnanl (long double x)
  50. -{
  51. - return __isnan ( (double)x );
  52. -}
  53. -libm_hidden_def(__isnanl)
  54. +int_WRAPPER_C99(__isnan)
  55. #endif
  56. #ifdef L_isinfl
  57. -int __isinfl (long double x)
  58. -{
  59. - return __isinf ( (double)x );
  60. -}
  61. -libm_hidden_def(__isinfl)
  62. +int_WRAPPER_C99(__isinf)
  63. #endif
  64. -#endif
  65. +#endif /* DO_C99_MATH */
  66. +
  67. +#undef int_WRAPPER_C99
  68. Index: uClibc-0.9.30.1/libm/nan.c
  69. ===================================================================
  70. --- uClibc-0.9.30.1/libm/nan.c (revision 25552)
  71. +++ uClibc-0.9.30.1/libm/nan.c (working copy)
  72. @@ -45,7 +45,7 @@ float nanf (const char *tagp)
  73. }
  74. libm_hidden_def(nanf)
  75. -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  76. +#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH
  77. libm_hidden_proto(nanl)
  78. long double nanl (const char *tagp)
  79. {
  80. Index: uClibc-0.9.30.1/include/math.h
  81. ===================================================================
  82. --- uClibc-0.9.30.1/include/math.h (revision 25552)
  83. +++ uClibc-0.9.30.1/include/math.h (working copy)
  84. @@ -118,7 +118,7 @@ __BEGIN_DECLS
  85. # undef __MATH_PRECNAME
  86. # if (__STDC__ - 0 || __GNUC__ - 0) \
  87. - && (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT)
  88. + && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
  89. # ifdef __LDBL_COMPAT
  90. # ifdef __USE_ISOC99
  91. @@ -230,7 +230,7 @@ enum
  92. };
  93. /* Return number of classification appropriate for X. */
  94. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  95. +# ifdef __NO_LONG_DOUBLE_MATH
  96. # define fpclassify(x) \
  97. (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x))
  98. # else
  99. @@ -242,7 +242,7 @@ enum
  100. # endif
  101. /* Return nonzero value if sign of X is negative. */
  102. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  103. +# ifdef __NO_LONG_DOUBLE_MATH
  104. # define signbit(x) \
  105. (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x))
  106. # else
  107. @@ -254,7 +254,7 @@ enum
  108. # endif
  109. /* Return nonzero value if X is not +-Inf or NaN. */
  110. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  111. +# ifdef __NO_LONG_DOUBLE_MATH
  112. # define isfinite(x) \
  113. (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x))
  114. # else
  115. @@ -270,7 +270,7 @@ enum
  116. /* Return nonzero value if X is a NaN. We could use `fpclassify' but
  117. we already have this functions `__isnan' and it is faster. */
  118. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  119. +# ifdef __NO_LONG_DOUBLE_MATH
  120. # define isnan(x) \
  121. (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
  122. # else
  123. @@ -282,7 +282,7 @@ enum
  124. # endif
  125. /* Return nonzero value is X is positive or negative infinity. */
  126. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  127. +# ifdef __NO_LONG_DOUBLE_MATH
  128. # define isinf(x) \
  129. (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
  130. # else
  131. Index: uClibc-0.9.30.1/include/tgmath.h
  132. ===================================================================
  133. --- uClibc-0.9.30.1/include/tgmath.h (revision 25552)
  134. +++ uClibc-0.9.30.1/include/tgmath.h (working copy)
  135. @@ -36,7 +36,7 @@
  136. #if __GNUC_PREREQ (2, 7)
  137. -# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  138. +# ifdef __NO_LONG_DOUBLE_MATH
  139. # define __tgml(fct) fct
  140. # else
  141. # define __tgml(fct) fct ## l
  142. Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h
  143. ===================================================================
  144. --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (revision 25552)
  145. +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (working copy)
  146. @@ -7,13 +7,13 @@
  147. # define __WORDSIZE 32
  148. #endif
  149. -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
  150. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
  151. /* Signal the glibc ABI didn't used to have a `long double'.
  152. The changes all the `long double' function variants to be redirects
  153. to the double functions. */
  154. # define __LONG_DOUBLE_MATH_OPTIONAL 1
  155. # ifndef __LONG_DOUBLE_128__
  156. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  157. +# define __NO_LONG_DOUBLE_MATH 1
  158. # endif
  159. #endif
  160. Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h
  161. ===================================================================
  162. --- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (revision 25552)
  163. +++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (working copy)
  164. @@ -65,11 +65,13 @@ typedef double double_t;
  165. #endif /* ISO C99 */
  166. -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  167. +#ifndef __NO_LONG_DOUBLE_MATH
  168. #include <bits/wordsize.h>
  169. /* Signal that we do not really have a `long double'. The disables the
  170. declaration of all the `long double' function variants. */
  171. # if __WORDSIZE == 32
  172. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  173. +# define __NO_LONG_DOUBLE_MATH 1
  174. +# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  175. +# define __NO_LONG_DOUBLE_MATH 1
  176. # endif /* __WORDSIZE == 32 */
  177. -#endif /* __UCLIBC_HAS_LONG_DOUBLE_MATH__ */
  178. +#endif /* __NO_LONG_DOUBLE_MATH */
  179. Index: uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h
  180. ===================================================================
  181. --- uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (revision 25552)
  182. +++ uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (working copy)
  183. @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
  184. # define FP_ILOGBNAN (2147483647)
  185. #endif /* ISO C99 */
  186. +
  187. +#ifndef __NO_LONG_DOUBLE_MATH
  188. +/* Signal that we do not really have a `long double'. This disables the
  189. + declaration of all the `long double' function variants. */
  190. +/* XXX The FPA does support this but the patterns in GCC are currently
  191. + turned off. */
  192. +# define __NO_LONG_DOUBLE_MATH 1
  193. +#endif
  194. Index: uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h
  195. ===================================================================
  196. --- uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (revision 25552)
  197. +++ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (working copy)
  198. @@ -36,3 +36,7 @@ typedef long double double_t; /* `double
  199. # define FP_ILOGBNAN (2147483647)
  200. #endif /* ISO C99 */
  201. +
  202. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  203. +# define __NO_LONG_DOUBLE_MATH 1
  204. +#endif
  205. Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h
  206. ===================================================================
  207. --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (revision 25552)
  208. +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (working copy)
  209. @@ -18,13 +18,13 @@
  210. #define __WORDSIZE 64
  211. -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
  212. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
  213. /* Signal that we didn't used to have a `long double'. The changes all
  214. the `long double' function variants to be redirects to the double
  215. functions. */
  216. # define __LONG_DOUBLE_MATH_OPTIONAL 1
  217. # ifndef __LONG_DOUBLE_128__
  218. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  219. +# define __NO_LONG_DOUBLE_MATH 1
  220. # endif
  221. #endif
  222. Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h
  223. ===================================================================
  224. --- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (revision 25552)
  225. +++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (working copy)
  226. @@ -78,3 +78,7 @@ typedef double double_t;
  227. # endif /* GNUC before 3.4 */
  228. #endif /* COMPLEX_H */
  229. +
  230. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  231. +# define __NO_LONG_DOUBLE_MATH 1
  232. +#endif
  233. Index: uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h
  234. ===================================================================
  235. --- uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (revision 25552)
  236. +++ uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (working copy)
  237. @@ -35,3 +35,9 @@ typedef double double_t; /* `double' exp
  238. # define FP_ILOGBNAN 2147483647
  239. #endif /* ISO C99 */
  240. +
  241. +#ifndef __NO_LONG_DOUBLE_MATH
  242. +/* Signal that we do not really have a `long double'. The disables the
  243. + declaration of all the `long double' function variants. */
  244. +# define __NO_LONG_DOUBLE_MATH 1
  245. +#endif
  246. Index: uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h
  247. ===================================================================
  248. --- uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (revision 25552)
  249. +++ uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (working copy)
  250. @@ -44,3 +44,7 @@ typedef long double double_t; /* `double
  251. # define FP_ILOGBNAN (-2147483647 - 1)
  252. #endif /* ISO C99 */
  253. +
  254. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  255. +# define __NO_LONG_DOUBLE_MATH 1
  256. +#endif
  257. Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h
  258. ===================================================================
  259. --- uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (revision 25552)
  260. +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (working copy)
  261. @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
  262. # define FP_ILOGBNAN (2147483647)
  263. #endif /* ISO C99 */
  264. +
  265. +#ifndef __NO_LONG_DOUBLE_MATH
  266. +/* Signal that we do not really have a `long double'. This disables the
  267. + declaration of all the `long double' function variants. */
  268. +/* XXX The FPA does support this but the patterns in GCC are currently
  269. + turned off. */
  270. +# define __NO_LONG_DOUBLE_MATH 1
  271. +#endif
  272. Index: uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h
  273. ===================================================================
  274. --- uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (revision 25552)
  275. +++ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (working copy)
  276. @@ -46,3 +46,7 @@ typedef long double double_t; /* `double
  277. # define FP_ILOGBNAN (-2147483647 - 1)
  278. #endif /* ISO C99 */
  279. +
  280. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  281. +# define __NO_LONG_DOUBLE_MATH 1
  282. +#endif
  283. Index: uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h
  284. ===================================================================
  285. --- uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (revision 25552)
  286. +++ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (working copy)
  287. @@ -36,8 +36,8 @@ typedef double double_t; /* `double' exp
  288. #endif /* ISO C99 */
  289. -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  290. +#ifndef __NO_LONG_DOUBLE_MATH
  291. /* Signal that we do not really have a `long double'. The disables the
  292. declaration of all the `long double' function variants. */
  293. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  294. +# define __NO_LONG_DOUBLE_MATH 1
  295. #endif
  296. Index: uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h
  297. ===================================================================
  298. --- uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (revision 25552)
  299. +++ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (working copy)
  300. @@ -35,3 +35,7 @@ typedef double double_t; /* `double' exp
  301. # define FP_ILOGBNAN 2147483647
  302. #endif /* ISO C99 */
  303. +
  304. +#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  305. +# define __NO_LONG_DOUBLE_MATH 1
  306. +#endif
  307. Index: uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h
  308. ===================================================================
  309. --- uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (revision 25552)
  310. +++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (working copy)
  311. @@ -39,8 +39,10 @@ typedef double double_t; /* `double' exp
  312. #endif /* ISO C99 */
  313. -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && _MIPS_SIM == _ABIO32
  314. +#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
  315. /* Signal that we do not really have a `long double'. This disables the
  316. declaration of all the `long double' function variants. */
  317. -# error defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ and _MIPS_SIM == _ABIO32
  318. +# define __NO_LONG_DOUBLE_MATH 1
  319. +#elif !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  320. +# define __NO_LONG_DOUBLE_MATH 1
  321. #endif
  322. Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h
  323. ===================================================================
  324. --- uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (revision 25552)
  325. +++ uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (working copy)
  326. @@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
  327. # define FP_ILOGBNAN (2147483647)
  328. #endif /* ISO C99 */
  329. +
  330. +#ifndef __NO_LONG_DOUBLE_MATH
  331. +/* Signal that we do not really have a `long double'. This disables the
  332. + declaration of all the `long double' function variants. */
  333. +/* XXX The FPA does support this but the patterns in GCC are currently
  334. + turned off. */
  335. +# define __NO_LONG_DOUBLE_MATH 1
  336. +#endif
  337. Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h
  338. ===================================================================
  339. --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (revision 25552)
  340. +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (working copy)
  341. @@ -6,7 +6,7 @@
  342. # define __WORDSIZE 32
  343. #endif
  344. -#if 0 /* uClibc: done in mathdefs.h: defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
  345. +#if 0 /* uClibc: done in mathdefs.h: !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
  346. # if __WORDSIZE == 32
  347. /* Signal that in 32bit ABI we didn't used to have a `long double'.
  348. @@ -14,7 +14,7 @@
  349. to the double functions. */
  350. # define __LONG_DOUBLE_MATH_OPTIONAL 1
  351. # ifndef __LONG_DOUBLE_128__
  352. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  353. +# define __NO_LONG_DOUBLE_MATH 1
  354. # endif
  355. # endif
  356. #endif
  357. Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h
  358. ===================================================================
  359. --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (revision 25552)
  360. +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (working copy)
  361. @@ -57,13 +57,15 @@ typedef double double_t;
  362. #endif /* ISO C99 */
  363. -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  364. +#ifndef __NO_LONG_DOUBLE_MATH
  365. # if __WORDSIZE == 32
  366. /* Signal that in 32bit ABI we do not really have a `long double'.
  367. The disables the declaration of all the `long double' function
  368. variants. */
  369. -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  370. +# define __NO_LONG_DOUBLE_MATH 1
  371. +# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  372. +# define __NO_LONG_DOUBLE_MATH 1
  373. # endif
  374. #endif
  375. Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h
  376. ===================================================================
  377. --- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (revision 25552)
  378. +++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (working copy)
  379. @@ -37,7 +37,7 @@
  380. # if __WORDSIZE == 32
  381. -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  382. +# ifndef __NO_LONG_DOUBLE_MATH
  383. # define __unordered_cmp(x, y) \
  384. (__extension__ \
  385. @@ -157,7 +157,7 @@ __NTH (__signbit (double __x))
  386. return __u.__i[0] < 0;
  387. }
  388. -# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
  389. +# ifndef __NO_LONG_DOUBLE_MATH
  390. __MATH_INLINE int
  391. __NTH (__signbitl (long double __x))
  392. {
  393. @@ -219,7 +219,7 @@ __NTH (sqrtl (long double __x))
  394. _Qp_sqrt (&__r, &__x);
  395. return __r;
  396. }
  397. -# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  398. +# elif !defined __NO_LONG_DOUBLE_MATH
  399. __MATH_INLINE long double
  400. sqrtl (long double __x) __THROW
  401. {
  402. @@ -257,7 +257,7 @@ __ieee754_sqrtl (long double __x)
  403. _Qp_sqrt(&__r, &__x);
  404. return __r;
  405. }
  406. -# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  407. +# elif !defined __NO_LONG_DOUBLE_MATH
  408. __MATH_INLINE long double
  409. __ieee754_sqrtl (long double __x)
  410. {
  411. Index: uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h
  412. ===================================================================
  413. --- uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (revision 25552)
  414. +++ uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (working copy)
  415. @@ -61,3 +61,9 @@ typedef double double_t;
  416. # define FP_ILOGBNAN 0x7fffffff
  417. #endif /* ISO C99 */
  418. +
  419. +#ifndef __NO_LONG_DOUBLE_MATH
  420. +/* Signal that we do not really have a `long double'. The disables the
  421. + declaration of all the `long double' function variants. */
  422. +# define __NO_LONG_DOUBLE_MATH 1
  423. +#endif