uClibc: bsd supports the same floating point classification functions as c99, fixes...
[openwrt-10.03/.git] / toolchain / uClibc / patches-0.9.29 / 006-rm_whitespace.patch
1 --- a/include/assert.h
2 +++ b/include/assert.h
3 @@ -31,7 +31,7 @@
4  #define        _ASSERT_H       1
5  #include <features.h>
6  
7 -#if defined __cplusplus && __GNUC_PREREQ (2,95)
8 +#if defined __cplusplus && __GNUC_PREREQ(2,95)
9  # define __ASSERT_VOID_CAST static_cast<void>
10  #else
11  # define __ASSERT_VOID_CAST (void)
12 @@ -59,13 +59,17 @@ __END_DECLS
13    (__ASSERT_VOID_CAST ((expr) ? 0 :                                          \
14                        (__assert (__STRING(expr), __FILE__, __LINE__,    \
15                                        __ASSERT_FUNCTION), 0)))
16 -  
17 +
18 +/* Define some temporaries to workaround tinyx makedepend bug */
19 +#define        __GNUC_PREREQ_2_6       __GNUC_PREREQ(2, 6)
20 +#define        __GNUC_PREREQ_2_4       __GNUC_PREREQ(2, 4)
21  /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
22     which contains the name of the function currently being defined.
23     This is broken in G++ before version 2.6.
24     C9x has a similar variable called __func__, but prefer the GCC one since
25     it demangles C++ function names.  */
26 -# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
27 +
28 +# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
29  #   define __ASSERT_FUNCTION   __PRETTY_FUNCTION__
30  # else
31  #  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
32 --- a/include/complex.h
33 +++ b/include/complex.h
34 @@ -33,7 +33,7 @@ __BEGIN_DECLS
35  /* We might need to add support for more compilers here.  But since ISO
36     C99 is out hopefully all maintained compilers will soon provide the data
37     types `float complex' and `double complex'.  */
38 -#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
39 +#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
40  # define _Complex __complex__
41  #endif
42  
43 --- a/include/features.h
44 +++ b/include/features.h
45 @@ -143,7 +143,7 @@
46  
47  /* Convenience macros to test the versions of glibc and gcc.
48     Use them like this:
49 -   #if __GNUC_PREREQ (2,8)
50 +   #if __GNUC_PREREQ(2,8)
51     ... code requiring gcc 2.8 or later ...
52     #endif
53     Note - they won't work for gcc1 or glibc1, since the _MINOR macros
54 @@ -297,7 +297,7 @@
55  /* uClibc does not support _FORTIFY_SOURCE */
56  #undef _FORTIFY_SOURCE
57  #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
58 -    && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
59 +    && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
60  # if _FORTIFY_SOURCE > 1
61  #  define __USE_FORTIFY_LEVEL 2
62  # else
63 @@ -366,7 +366,7 @@
64  #endif /* !ASSEMBLER */
65  
66  /* Decide whether we can define 'extern inline' functions in headers.  */
67 -#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
68 +#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
69      && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
70  # define __USE_EXTERN_INLINES  1
71  #endif
72 --- a/include/tgmath.h
73 +++ b/include/tgmath.h
74 @@ -34,7 +34,7 @@
75     do not try this for now and instead concentrate only on GNU CC.  Once
76     we have more information support for other compilers might follow.  */
77  
78 -#if __GNUC_PREREQ (2, 7)
79 +#if __GNUC_PREREQ(2, 7)
80  
81  # ifdef __NO_LONG_DOUBLE_MATH
82  #  define __tgml(fct) fct