patches/mpfr/2.4.2/110-longlong.h.patch
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
     1 diff -Naurd mpfr-2.4.2-a/PATCHES mpfr-2.4.2-b/PATCHES
     2 --- mpfr-2.4.2-a/PATCHES	2009-12-18 12:03:30.000000000 +0000
     3 +++ mpfr-2.4.2-b/PATCHES	2009-12-18 12:05:19.000000000 +0000
     4 @@ -0,0 +1 @@
     5 +longlong.h
     6 diff -Naurd mpfr-2.4.2-a/VERSION mpfr-2.4.2-b/VERSION
     7 --- mpfr-2.4.2-a/VERSION	2009-12-07 13:37:12.000000000 +0000
     8 +++ mpfr-2.4.2-b/VERSION	2009-12-18 12:05:09.000000000 +0000
     9 @@ -1 +1 @@
    10 -2.4.2-p1
    11 +2.4.2-p2
    12 diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h
    13 --- mpfr-2.4.2-a/mpfr-longlong.h	2009-11-30 02:43:08.000000000 +0000
    14 +++ mpfr-2.4.2-b/mpfr-longlong.h	2009-12-18 12:04:29.000000000 +0000
    15 @@ -1011,7 +1011,15 @@
    16  #endif /* __m88000__ */
    17  
    18  #if defined (__mips) && W_TYPE_SIZE == 32
    19 -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    20 +#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
    21 +#define umul_ppmm(w1, w0, u, v) \
    22 +  do {									\
    23 +    UDItype _r;							\
    24 +    _r = (UDItype) u * v;						\
    25 +    (w1) = _r >> 32;							\
    26 +    (w0) = (USItype) _r;						\
    27 +  } while (0)
    28 +#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    29  #define umul_ppmm(w1, w0, u, v) \
    30    __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
    31  #else
    32 @@ -1024,7 +1032,16 @@
    33  #endif /* __mips */
    34  
    35  #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
    36 -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    37 +#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
    38 +typedef unsigned int UTItype __attribute__ ((mode (TI)));
    39 +#define umul_ppmm(w1, w0, u, v) \
    40 +  do {									\
    41 +    UTItype _r;							\
    42 +    _r = (UTItype) u * v;						\
    43 +    (w1) = _r >> 64;							\
    44 +    (w0) = (UDItype) _r;						\
    45 +  } while (0)
    46 +#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
    47  #define umul_ppmm(w1, w0, u, v) \
    48    __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
    49  #else
    50 diff -Naurd mpfr-2.4.2-a/mpfr.h mpfr-2.4.2-b/mpfr.h
    51 --- mpfr-2.4.2-a/mpfr.h	2009-12-07 13:37:12.000000000 +0000
    52 +++ mpfr-2.4.2-b/mpfr.h	2009-12-18 12:05:09.000000000 +0000
    53 @@ -27,7 +27,7 @@
    54  #define MPFR_VERSION_MAJOR 2
    55  #define MPFR_VERSION_MINOR 4
    56  #define MPFR_VERSION_PATCHLEVEL 2
    57 -#define MPFR_VERSION_STRING "2.4.2-p1"
    58 +#define MPFR_VERSION_STRING "2.4.2-p2"
    59  
    60  /* Macros dealing with MPFR VERSION */
    61  #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
    62 diff -Naurd mpfr-2.4.2-a/version.c mpfr-2.4.2-b/version.c
    63 --- mpfr-2.4.2-a/version.c	2009-12-07 13:37:12.000000000 +0000
    64 +++ mpfr-2.4.2-b/version.c	2009-12-18 12:05:09.000000000 +0000
    65 @@ -25,5 +25,5 @@
    66  const char *
    67  mpfr_get_version (void)
    68  {
    69 -  return "2.4.2-p1";
    70 +  return "2.4.2-p2";
    71  }