patches/uClibc/0.9.30/120-rm-whitespace.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
permissions -rw-r--r--
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"

# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory

# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
     1 Original patch from Gentoo.
     2 
     3 -= BEGIN original header =-
     4 -= END original header =-
     5 
     6 diff -durN uClibc-0.9.30.orig/include/assert.h uClibc-0.9.30/include/assert.h
     7 --- uClibc-0.9.30.orig/include/assert.h	2008-07-23 13:23:36.000000000 +0200
     8 +++ uClibc-0.9.30/include/assert.h	2009-02-07 09:57:59.000000000 +0100
     9 @@ -31,7 +31,7 @@
    10  #define	_ASSERT_H	1
    11  #include <features.h>
    12  
    13 -#if defined __cplusplus && __GNUC_PREREQ (2,95)
    14 +#if defined __cplusplus && __GNUC_PREREQ(2,95)
    15  # define __ASSERT_VOID_CAST static_cast<void>
    16  #else
    17  # define __ASSERT_VOID_CAST (void)
    18 @@ -60,12 +60,15 @@
    19  		       (__assert (__STRING(expr), __FILE__, __LINE__,    \
    20  				       __ASSERT_FUNCTION), 0)))
    21  
    22 +/* Define some temporaries to workaround tinyx makedepend bug */
    23 +#define	__GNUC_PREREQ_2_6	__GNUC_PREREQ(2, 6)
    24 +#define	__GNUC_PREREQ_2_4	__GNUC_PREREQ(2, 4)
    25  /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
    26     which contains the name of the function currently being defined.
    27     This is broken in G++ before version 2.6.
    28     C9x has a similar variable called __func__, but prefer the GCC one since
    29     it demangles C++ function names.  */
    30 -# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
    31 +# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
    32  #   define __ASSERT_FUNCTION	__PRETTY_FUNCTION__
    33  # else
    34  #  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
    35 diff -durN uClibc-0.9.30.orig/include/complex.h uClibc-0.9.30/include/complex.h
    36 --- uClibc-0.9.30.orig/include/complex.h	2008-10-03 16:24:28.000000000 +0200
    37 +++ uClibc-0.9.30/include/complex.h	2009-02-07 09:57:59.000000000 +0100
    38 @@ -33,7 +33,7 @@
    39  /* We might need to add support for more compilers here.  But since ISO
    40     C99 is out hopefully all maintained compilers will soon provide the data
    41     types `float complex' and `double complex'.  */
    42 -#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
    43 +#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
    44  # define _Complex __complex__
    45  #endif
    46  
    47 diff -durN uClibc-0.9.30.orig/include/features.h uClibc-0.9.30/include/features.h
    48 --- uClibc-0.9.30.orig/include/features.h	2008-09-06 18:45:07.000000000 +0200
    49 +++ uClibc-0.9.30/include/features.h	2009-02-07 09:57:59.000000000 +0100
    50 @@ -143,7 +143,7 @@
    51  
    52  /* Convenience macros to test the versions of glibc and gcc.
    53     Use them like this:
    54 -   #if __GNUC_PREREQ (2,8)
    55 +   #if __GNUC_PREREQ(2,8)
    56     ... code requiring gcc 2.8 or later ...
    57     #endif
    58     Note - they won't work for gcc1 or glibc1, since the _MINOR macros
    59 @@ -297,7 +297,7 @@
    60  /* uClibc does not support _FORTIFY_SOURCE */
    61  #undef _FORTIFY_SOURCE
    62  #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
    63 -    && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
    64 +    && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
    65  # if _FORTIFY_SOURCE > 1
    66  #  define __USE_FORTIFY_LEVEL 2
    67  # else
    68 @@ -366,7 +366,7 @@
    69  #endif	/* !ASSEMBLER */
    70  
    71  /* Decide whether we can define 'extern inline' functions in headers.  */
    72 -#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
    73 +#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
    74      && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \
    75      && (defined __extern_inline || defined __GNUC_GNU_INLINE__)
    76  # define __USE_EXTERN_INLINES	1
    77 diff -durN uClibc-0.9.30.orig/include/tgmath.h uClibc-0.9.30/include/tgmath.h
    78 --- uClibc-0.9.30.orig/include/tgmath.h	2008-10-03 16:24:28.000000000 +0200
    79 +++ uClibc-0.9.30/include/tgmath.h	2009-02-07 09:57:59.000000000 +0100
    80 @@ -34,7 +34,7 @@
    81     do not try this for now and instead concentrate only on GNU CC.  Once
    82     we have more information support for other compilers might follow.  */
    83  
    84 -#if __GNUC_PREREQ (2, 7)
    85 +#if __GNUC_PREREQ(2, 7)
    86  
    87  # ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
    88  #  define __tgml(fct) fct