summaryrefslogtreecommitdiffstats
path: root/core/uclibc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-10 15:46:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-10 15:46:26 +0000
commitd92fc4b03ada9eb72f80de830e666269e207ee22 (patch)
tree706a19e14e7052a46a1181aa81b773ce7a014f4f /core/uclibc
parent9636f34248179dfe4ad9a78275c95ce93850221e (diff)
downloadaports-d92fc4b03ada9eb72f80de830e666269e207ee22.tar.bz2
aports-d92fc4b03ada9eb72f80de830e666269e207ee22.tar.xz
core/uclibc: fix res_query error codes
https://bugs.busybox.net/show_bug.cgi?id=173
Diffstat (limited to 'core/uclibc')
-rw-r--r--core/uclibc/APKBUILD8
-rw-r--r--core/uclibc/pthreads-fno-omit-frame-pointer.patch16
-rw-r--r--core/uclibc/uclibc-0.9.30-svn-fixes-20090213.patch2615
-rw-r--r--core/uclibc/uclibc-0.9.30.1-resolv.patch13
4 files changed, 20 insertions, 2632 deletions
diff --git a/core/uclibc/APKBUILD b/core/uclibc/APKBUILD
index 495ee036..7b7225cd 100644
--- a/core/uclibc/APKBUILD
+++ b/core/uclibc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=uclibc
pkgver=0.9.30.1
-pkgrel=0
+pkgrel=1
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -11,6 +11,7 @@ subpackages="$pkgname-dev"
depends_dev="linux-headers"
source="http://uclibc.org/downloads/$_mynamever.tar.bz2
+ $pkgname-0.9.30.1-resolv.patch
uclibcconfig
"
@@ -18,6 +19,10 @@ _prepare() {
local i gcc_major
cd "$srcdir/$_mynamever/"
# patches goes here
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 < $i || return 1
+ done
}
_compile() {
@@ -38,4 +43,5 @@ build() {
}
md5sums="1a4b84e5536ad8170563ffa88c34679c uClibc-0.9.30.1.tar.bz2
+ea91460617601b6e084ead66bc3948f5 uclibc-0.9.30.1-resolv.patch
765e04df10aa24532a448ac1b8e2086e uclibcconfig"
diff --git a/core/uclibc/pthreads-fno-omit-frame-pointer.patch b/core/uclibc/pthreads-fno-omit-frame-pointer.patch
deleted file mode 100644
index 16eea88d..00000000
--- a/core/uclibc/pthreads-fno-omit-frame-pointer.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- uClibc-0.9.30.orig/libpthread/linuxthreads.old/Makefile.in Thu Nov 13 09:53:27 2008
-+++ uClibc-0.9.30/libpthread/linuxthreads.old/Makefile.in Thu Nov 13 10:01:35 2008
-@@ -59,6 +59,13 @@
- libc-static-y += $(libpthread_OUT)/libc_pthread_init.o
- libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)
-
-+ifeq ($(TARGET_ARCH),i386)
-+# Most files must not be compiled without frame pointer since we need
-+# the frame base address which is stored in %ebp unless the frame pointer
-+# is optimized out.
-+CFLAGS += -fno-omit-frame-pointer -mpreferred-stack-boundary=4
-+endif
-+
- libpthread-static-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SPEC_SRC))
- libpthread-shared-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_SPEC_SRC))
-
diff --git a/core/uclibc/uclibc-0.9.30-svn-fixes-20090213.patch b/core/uclibc/uclibc-0.9.30-svn-fixes-20090213.patch
deleted file mode 100644
index 0d29acc7..00000000
--- a/core/uclibc/uclibc-0.9.30-svn-fixes-20090213.patch
+++ /dev/null
@@ -1,2615 +0,0 @@
-Index: test/locale-mbwc/dat_iswctype.c
-===================================================================
---- test/locale-mbwc/dat_iswctype.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ test/locale-mbwc/dat_iswctype.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -240,7 +240,7 @@
- { { 0x007B, "cntrl" }, { 0,1,0 } },
- { { 0x007E, "cntrl" }, { 0,1,0 } },
- { { 0x007F, "cntrl" }, { 0,0,0 } },
-- { { 0x0080, "cntrl" }, { 0,0,0 } },
-+ { { 0x0080, "cntrl" }, { 0,1,0 } },
- { { 0x0000, "digit" }, { 0,1,0 } },
- { { 0x001F, "digit" }, { 0,1,0 } },
- { { 0x0020, "digit" }, { 0,1,0 } },
-Index: Makefile.in
-===================================================================
---- Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -159,7 +159,7 @@
- @$(disp_gen)
- $(Q)set -e; \
- cd $(top_builddir); \
-- tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
-+ tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
- [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
- KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
- if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
-@@ -167,6 +167,15 @@
- else \
- mv -f $$tmp include/bits/sysnum.h; \
- fi
-+ @# Ugly linux specific hack..
-+ $(Q)if grep -q __NR_ $@; then true; else \
-+ rm -f $@; \
-+ echo "ERROR: Could not generate syscalls."; \
-+ echo "Make sure that you have proper kernel headers."; \
-+ echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
-+ echo "${KERNEL_HEADERS}"; \
-+ exit 1; \
-+ fi
-
- $(LOCAL_INSTALL_PATH):
- $(Q)$(MAKE) PREFIX=$(shell pwd)/ RUNTIME_PREFIX=./ \
-@@ -315,7 +324,13 @@
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/inotify.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/perm.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/personality.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/prctl.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/reboot.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sendfile.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/fsuid.h
- $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/signalfd.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/swap.h
-+ $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/sysctl.h
- endif
- ifneq ($(UCLIBC_SV4_DEPRECATED),y)
- # Remove ustat.h since deprecated SV4 support was disabled upon request
-Index: libnsl/Makefile.in
-===================================================================
---- libnsl/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libnsl/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -7,7 +7,7 @@
-
- CFLAGS-libnsl := -DNOT_IN_libc -DIS_IN_libnsl $(SSP_ALL_CFLAGS)
-
--LDFLAGS-libnsl.so := $(LDFLAGS)
-+LDFLAGS-libnsl.so := $(LDFLAGS) $(call link.asneeded,-lc)
-
- LIBS-libnsl.so := $(LIBS)
-
-Index: libm/s_finite.c
-===================================================================
---- libm/s_finite.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_finite.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -25,5 +25,3 @@
- return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
- }
- libm_hidden_def(__finite)
--weak_alias(__finite,finite)
--libm_hidden_weak(finite)
-Index: libm/s_isinff.c
-===================================================================
---- libm/s_isinff.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_isinff.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -11,7 +11,6 @@
- #include "math.h"
- #include "math_private.h"
-
--libm_hidden_proto(__isinff)
- int
- __isinff (float x)
- {
-@@ -23,4 +22,3 @@
- return ~(t >> 31) & (ix >> 30);
- }
- libm_hidden_def(__isinff)
--strong_alias (__isinff, isinff)
-Index: libm/Makefile.in
-===================================================================
---- libm/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -86,13 +86,13 @@
- scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
- tgammaf.o truncf.o cargf.o llrintf.o
-
--LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cbrtl.o \
-+LD_MOBJ := acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cargl.o cbrtl.o \
- ceill.o copysignl.o coshl.o cosl.o erfcl.o erfl.o exp2l.o expl.o \
-- expm1l.o fabsl.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o \
-- frexpl.o gammal.o hypotl.o ilogbl.o ldexpl.o lgammal.o llrintl.o \
-+ expm1l.o fabsl.o finitel.o fdiml.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o fpclassifyl.o \
-+ frexpl.o gammal.o hypotl.o ilogbl.o isinfl.o isnanl.o ldexpl.o lgammal.o llrintl.o \
- llroundl.o log10l.o log1pl.o XXXlog2l.o logbl.o logl.o lrintl.o lroundl.o \
- modfl.o nearbyintl.o nextafterl.o XXXnexttowardl.o powl.o remainderl.o \
-- remquol.o rintl.o roundl.o scalblnl.o scalbnl.o sinhl.o sinl.o sqrtl.o \
-+ remquol.o rintl.o roundl.o scalblnl.o scalbnl.o signbitl.o sinhl.o sinl.o sqrtl.o \
- tanhl.o tanl.o tgammal.o truncl.o
- else
- # This list of math functions was taken from POSIX/IEEE 1003.1b-1993
-@@ -139,21 +139,21 @@
- libm_OBJ := $(patsubst $(libm_DIR)/%.c,$(libm_OUT)/%.o,$(libm_SRC))
-
- ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
--libm_MSRC2 := $(libm_DIR)/$(LD_MSRC)
--libm_MOBJ2 := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ))
-+libm_MSRC_LD := $(libm_DIR)/$(LD_MSRC)
-+libm_MOBJ_LD := $(patsubst %.o,$(libm_OUT)/%.o,$(LD_MOBJ))
- endif
--libm_MSRC := $(libm_DIR)/$(FL_MSRC)
--libm_MOBJ := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
-+libm_MSRC_FL := $(libm_DIR)/$(FL_MSRC)
-+libm_MOBJ_FL := $(patsubst %.o,$(libm_OUT)/%.o,$(FL_MOBJ))
-
-
- ifneq ($(DOMULTI),n)
--CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
-+CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_FL))))
- ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
--CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ2))))
-+CFLAGS-libm += $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ_LD))))
- endif
- endif
-
--libm_OBJS := $(libm_OBJ) $(libm_MOBJ) $(libm_MOBJ2)
-+libm_OBJS := $(libm_OBJ) $(libm_MOBJ_FL) $(libm_MOBJ_LD)
-
- ifeq ($(DOPIC),y)
- libm-a-y += $(libm_OBJS:.o=.os)
-@@ -182,7 +182,7 @@
- $(Q)$(RM) $@
- $(do_ar)
-
--$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC) $(libm_MSRC2) $(libm_ARCH_SRC)
-+$(libm_OUT)/libm.oS: $(libm_SRC) $(libm_MSRC_FL) $(libm_MSRC_LD) $(libm_ARCH_SRC)
- $(Q)$(RM) $@
- $(compile-m)
-
-@@ -191,17 +191,24 @@
- $(Q)$(RM) $@
- $(do_ar)
-
--$(libm_MOBJ): $(libm_MSRC)
-+$(libm_MOBJ_FL): $(libm_MSRC_FL)
- $(compile.m)
-
--$(libm_MOBJ2): $(libm_MSRC2)
-+$(libm_MOBJ_LD): $(libm_MSRC_LD)
- $(compile.m)
-
--$(libm_MOBJ:.o=.os): $(libm_MSRC)
-+$(libm_MOBJ_FL:.o=.os): $(libm_MSRC_FL)
- $(compile.m)
-
--$(libm_MOBJ2:.o=.os): $(libm_MSRC2)
-+$(libm_MOBJ_LD:.o=.os): $(libm_MSRC_LD)
- $(compile.m)
-
-+# spare us from adding a gazillion dummy two-liner files
-+$(libm_MOBJ_FL:.o=.i): $(libm_MSRC_FL)
-+ $(compile.mi)
-+
-+$(libm_MOBJ_LD:.o=.i): $(libm_MSRC_LD)
-+ $(compile.mi)
-+
- libm_clean:
- $(do_rm) $(addprefix $(libm_OUT)/,$(foreach e, o os oS a,$(foreach d, *. */*. */*/*.,$(d)$(e))))
-Index: libm/s_finitef.c
-===================================================================
---- libm/s_finitef.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_finitef.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -21,7 +21,6 @@
- #include "math.h"
- #include "math_private.h"
-
--libm_hidden_proto(__finitef)
- int __finitef(float x)
- {
- int32_t ix;
-@@ -29,4 +28,3 @@
- return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31);
- }
- libm_hidden_def(__finitef)
--strong_alias(__finitef,finitef)
-Index: libm/ldouble_wrappers.c
-===================================================================
---- libm/ldouble_wrappers.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/ldouble_wrappers.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -11,7 +11,9 @@
- */
-
- #include "math.h"
-+#include <complex.h>
-
-+
- /* Implement the following, as defined by SuSv3 */
- #if 0
- long double acoshl(long double);
-@@ -21,6 +23,7 @@
- long double atan2l(long double, long double);
- long double atanhl(long double);
- long double atanl(long double);
-+long double cargl(long double complex);
- long double cbrtl(long double);
- long double ceill(long double);
- long double copysignl(long double, long double);
-@@ -128,6 +131,14 @@
- #endif
-
-
-+#ifdef L_cargl
-+long double cargl (long double complex x)
-+{
-+ return (long double) carg( (double complex)x );
-+}
-+#endif
-+
-+
- #ifdef L_cbrtl
- long double cbrtl (long double x)
- {
-@@ -521,3 +532,43 @@
- return (long double) trunc( (double)x );
- }
- #endif
-+
-+
-+#ifdef __DO_C99_MATH__
-+
-+#ifdef L_fpclassifyl
-+int __fpclassifyl (long double x)
-+{
-+ return __fpclassify ( (double) x );
-+}
-+#endif
-+
-+#ifdef L_finitel
-+int __finitel (long double x)
-+{
-+ return __finite ( (double)x );
-+}
-+#endif
-+
-+#ifdef L_signbitl
-+int __signbitl (long double x)
-+{
-+ return __signbitl ( (double)x );
-+}
-+#endif
-+
-+#ifdef L_isnanl
-+int __isnanl (long double x)
-+{
-+ return __isnan ( (double)x );
-+}
-+#endif
-+
-+#ifdef L_isinfl
-+int __isinfl (long double x)
-+{
-+ return __isinf ( (double)x );
-+}
-+#endif
-+
-+#endif
-Index: libm/w_exp.c
-===================================================================
---- libm/w_exp.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_exp.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -42,7 +42,7 @@
- double z;
- z = __ieee754_exp(x);
- if(_LIB_VERSION == _IEEE_) return z;
-- if(finite(x)) {
-+ if(isfinite(x)) {
- if(x>o_threshold)
- return __kernel_standard(x,x,6); /* exp overflow */
- else if(x<u_threshold)
-Index: libm/s_fma.c
-===================================================================
---- libm/s_fma.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_fma.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -20,11 +20,9 @@
-
- #include <math.h>
-
--libm_hidden_proto(__fma)
- double
--__fma (double x, double y, double z)
-+fma (double x, double y, double z)
- {
- return (x * y) + z;
- }
--libm_hidden_def(__fma)
--strong_alias (__fma, fma)
-+libm_hidden_def(fma)
-Index: libm/s_signbitf.c
-===================================================================
---- libm/s_signbitf.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_signbitf.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -22,7 +22,6 @@
-
- #include "math_private.h"
-
--libm_hidden_proto(__signbitf)
- int
- __signbitf (float x)
- {
-Index: libm/w_log2.c
-===================================================================
---- libm/w_log2.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_log2.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -11,4 +11,3 @@
- {
- return __ieee754_log2 (d);
- }
--libm_hidden_def(log2)
-Index: libm/w_jn.c
-===================================================================
---- libm/w_jn.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_jn.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -62,7 +62,6 @@
- return z;
- #endif
- }
--libm_hidden_def(jn)
-
- #ifdef __STDC__
- double yn(int n, double x) /* wrapper yn */
-@@ -91,4 +90,3 @@
- return z;
- #endif
- }
--libm_hidden_def(yn)
-Index: libm/w_j1.c
-===================================================================
---- libm/w_j1.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_j1.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -40,7 +40,6 @@
- return z;
- #endif
- }
--libm_hidden_def(j1)
-
- #ifdef __STDC__
- double y1(double x) /* wrapper y1 */
-@@ -69,4 +68,3 @@
- return z;
- #endif
- }
--libm_hidden_def(y1)
-Index: libm/s_isnanf.c
-===================================================================
---- libm/s_isnanf.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_isnanf.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -21,7 +21,6 @@
- #include "math.h"
- #include "math_private.h"
-
--libm_hidden_proto (__isnanf)
- int __isnanf(float x)
- {
- int32_t ix;
-@@ -30,5 +29,4 @@
- ix = 0x7f800000 - ix;
- return (int)(((u_int32_t)(ix))>>31);
- }
--libm_hidden_def (__isnanf)
--weak_alias (__isnanf, isnanf)
-+libm_hidden_def(__isnanf)
-Index: libm/w_lgamma_r.c
-===================================================================
---- libm/w_lgamma_r.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_lgamma_r.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -34,7 +34,7 @@
- double y;
- y = __ieee754_lgamma_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
-- if(!finite(y)&&finite(x)) {
-+ if(!isfinite(y)&&isfinite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
-@@ -43,4 +43,3 @@
- return y;
- #endif
- }
--libm_hidden_def(lgamma_r)
-Index: libm/w_hypot.c
-===================================================================
---- libm/w_hypot.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_hypot.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -34,7 +34,7 @@
- double z;
- z = __ieee754_hypot(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
-- if((!finite(z))&&finite(x)&&finite(y))
-+ if((!isfinite(z))&&isfinite(x)&&isfinite(y))
- return __kernel_standard(x,y,4); /* hypot overflow */
- else
- return z;
-Index: libm/s_isinf.c
-===================================================================
---- libm/s_isinf.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_isinf.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -22,5 +22,3 @@
- return ~(lx >> 31) & (hx >> 30);
- }
- libm_hidden_def(__isinf)
--weak_alias (__isinf, isinf)
--libm_hidden_weak(isinf)
-Index: libm/s_significand.c
-===================================================================
---- libm/s_significand.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_significand.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -33,4 +33,3 @@
- {
- return __ieee754_scalb(x,(double) -ilogb(x));
- }
--libm_hidden_def(significand)
-Index: libm/w_gamma.c
-===================================================================
---- libm/w_gamma.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_gamma.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -37,7 +37,7 @@
- double y;
- y = __ieee754_lgamma_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
-- if(!finite(y)&&finite(x)) {
-+ if(!isfinite(y)&&isfinite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* gamma pole */
- else
-@@ -46,4 +46,3 @@
- return y;
- #endif
- }
--libm_hidden_def(gamma)
-Index: libm/w_drem.c
-===================================================================
---- libm/w_drem.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_drem.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -12,4 +12,3 @@
- {
- return remainder(x, y);
- }
--libm_hidden_def(drem)
-Index: libm/s_fpclassify.c
-===================================================================
---- libm/s_fpclassify.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_fpclassify.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -40,4 +40,4 @@
-
- return retval;
- }
--libm_hidden_def (__fpclassify)
-+libm_hidden_def(__fpclassify)
-Index: libm/w_sinh.c
-===================================================================
---- libm/w_sinh.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_sinh.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -34,7 +34,7 @@
- double z;
- z = __ieee754_sinh(x);
- if(_LIB_VERSION == _IEEE_) return z;
-- if(!finite(z)&&finite(x)) {
-+ if(!isfinite(z)&&isfinite(x)) {
- return __kernel_standard(x,x,25); /* sinh overflow */
- } else
- return z;
-Index: libm/e_scalb.c
-===================================================================
---- libm/e_scalb.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/e_scalb.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -44,7 +44,7 @@
- return scalbn(x,fn);
- #else
- if (isnan(x)||isnan(fn)) return x*fn;
-- if (!finite(fn)) {
-+ if (!isfinite(fn)) {
- if(fn>0.0) return x*fn;
- else return x/(-fn);
- }
-Index: libm/float_wrappers.c
-===================================================================
---- libm/float_wrappers.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/float_wrappers.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -36,6 +36,7 @@
- float atan2f(float, float);
- float atanf(float);
- float atanhf(float);
-+float cargf(float complex);
- float cbrtf(float);
- float ceilf(float);
- float copysignf(float, float);
-@@ -133,7 +134,7 @@
- #ifdef L_cargf
- float cargf (float complex x)
- {
-- return (float) carg( (double)x );
-+ return (float) carg( (double complex)x );
- }
- #endif
-
-@@ -532,3 +533,10 @@
- return (float) trunc( (double)x );
- }
- #endif
-+
-+#ifdef L_fmaf
-+float fmaf (float x, float y, float z)
-+{
-+ return (float) fma( (double)x, (double)y, (double)z );
-+}
-+#endif
-Index: libm/s_isnan.c
-===================================================================
---- libm/s_isnan.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_isnan.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -18,12 +18,7 @@
- #include "math.h"
- #include "math_private.h"
-
--#ifdef __STDC__
-- int __isnan(double x)
--#else
-- int __isnan(x)
-- double x;
--#endif
-+int __isnan(double x)
- {
- int32_t hx,lx;
- EXTRACT_WORDS(hx,lx,x);
-@@ -33,5 +28,3 @@
- return (int)(((u_int32_t)hx)>>31);
- }
- libm_hidden_def(__isnan)
--weak_alias(__isnan,isnan)
--libm_hidden_weak(isnan)
-Index: libm/s_ldexp.c
-===================================================================
---- libm/s_ldexp.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_ldexp.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -26,9 +26,9 @@
- double value; int exp;
- #endif
- {
-- if(!finite(value)||value==0.0) return value;
-+ if(!isfinite(value)||value==0.0) return value;
- value = scalbn(value,exp);
-- if(!finite(value)||value==0.0) errno = ERANGE;
-+ if(!isfinite(value)||value==0.0) errno = ERANGE;
- return value;
- }
- libm_hidden_def(ldexp)
-Index: libm/w_j0.c
-===================================================================
---- libm/w_j0.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_j0.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -39,7 +39,6 @@
- return z;
- #endif
- }
--libm_hidden_def(j0)
-
- #ifdef __STDC__
- double y0(double x) /* wrapper y0 */
-@@ -68,4 +67,3 @@
- return z;
- #endif
- }
--libm_hidden_def(y0)
-Index: libm/w_scalb.c
-===================================================================
---- libm/w_scalb.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_scalb.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -46,16 +46,15 @@
- double z;
- z = __ieee754_scalb(x,fn);
- if(_LIB_VERSION == _IEEE_) return z;
-- if(!(finite(z)||isnan(z))&&finite(x)) {
-+ if(!(isfinite(z)||isnan(z))&&isfinite(x)) {
- return __kernel_standard(x,(double)fn,32); /* scalb overflow */
- }
- if(z==0.0&&z!=x) {
- return __kernel_standard(x,(double)fn,33); /* scalb underflow */
- }
- #ifndef _SCALB_INT
-- if(!finite(fn)) errno = ERANGE;
-+ if(!isfinite(fn)) errno = ERANGE;
- #endif
- return z;
- #endif
- }
--libm_hidden_def(scalb)
-Index: libm/w_lgamma.c
-===================================================================
---- libm/w_lgamma.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_lgamma.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -37,7 +37,7 @@
- double y;
- y = __ieee754_lgamma_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
-- if(!finite(y)&&finite(x)) {
-+ if(!isfinite(y)&&isfinite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
-Index: libm/w_gamma_r.c
-===================================================================
---- libm/w_gamma_r.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_gamma_r.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -37,7 +37,7 @@
- double y;
- y = __ieee754_lgamma_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
-- if(!finite(y)&&finite(x)) {
-+ if(!isfinite(y)&&isfinite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* gamma pole */
- else
-Index: libm/s_fpclassifyf.c
-===================================================================
---- libm/s_fpclassifyf.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/s_fpclassifyf.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -21,9 +21,7 @@
- #include <math.h>
- #include "math_private.h"
-
--libm_hidden_proto (__fpclassifyf)
--int
--__fpclassifyf (float x)
-+int __fpclassifyf (float x)
- {
- u_int32_t wx;
- int retval = FP_NORMAL;
-@@ -39,4 +37,4 @@
-
- return retval;
- }
--libm_hidden_def (__fpclassifyf)
-+libm_hidden_def(__fpclassifyf)
-Index: libm/w_pow.c
-===================================================================
---- libm/w_pow.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_pow.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -41,19 +41,19 @@
- if(x==0.0){
- if(y==0.0)
- return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
-- if(finite(y)&&y<0.0)
-+ if(isfinite(y)&&y<0.0)
- return __kernel_standard(x,y,23); /* pow(0.0,negative) */
- return z;
- }
-- if(!finite(z)) {
-- if(finite(x)&&finite(y)) {
-+ if(!isfinite(z)) {
-+ if(isfinite(x)&&isfinite(y)) {
- if(isnan(z))
- return __kernel_standard(x,y,24); /* pow neg**non-int */
- else
- return __kernel_standard(x,y,21); /* pow overflow */
- }
- }
-- if(z==0.0&&finite(x)&&finite(y))
-+ if(z==0.0&&isfinite(x)&&isfinite(y))
- return __kernel_standard(x,y,22); /* pow underflow */
- return z;
- #endif
-Index: libm/w_tgamma.c
-===================================================================
---- libm/w_tgamma.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libm/w_tgamma.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -35,7 +35,7 @@
- #else
- if(_LIB_VERSION == _IEEE_) return y;
-
-- if(!finite(y)&&finite(x)) {
-+ if(!isfinite(y)&&isfinite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* tgamma pole */
- else
-Index: extra/locale/gen_wc8bit.c
-===================================================================
---- extra/locale/gen_wc8bit.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ extra/locale/gen_wc8bit.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -219,8 +219,8 @@
- fprintf(out, "\t{ /* %.*s */", n, s0);
- }
-
-- memset(&csd[numsets],sizeof(charset_data),0);
-- memset(xi, sizeof(xi), 0);
-+ memset(&csd[numsets], 0, sizeof(charset_data));
-+ memset(xi, 0, sizeof(xi));
- {
- unsigned long c, wc;
- int lines;
-Index: extra/scripts/conf-header.sh
-===================================================================
---- extra/scripts/conf-header.sh (.../tags/uClibc_0_9_30) (revision 25316)
-+++ extra/scripts/conf-header.sh (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -8,7 +8,7 @@
- fi
-
- cat <<EOF
--#if !defined __FEATURES_H && !defined __need_uClibc_config_h
-+#if !defined _FEATURES_H && !defined __need_uClibc_config_h
- # error Never include <bits/uClibc_config.h> directly; use <features.h> instead
- #endif
-
-Index: include/math.h
-===================================================================
---- include/math.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ include/math.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -46,6 +46,10 @@
- /* Get general and ISO C99 specific information. */
- #include <bits/mathdef.h>
-
-+#if !(defined _LIBC && (defined NOT_IN_libc && defined IS_IN_libm))
-+# define libm_hidden_proto(name, attrs...)
-+#endif
-+
- /* The file <bits/mathcalls.h> contains the prototypes for all the
- actual math functions. These macros are used for those prototypes,
- so we can easily declare each function as both `name' and `__name',
-@@ -54,16 +58,30 @@
- #define __MATHCALL(function,suffix, args) \
- __MATHDECL (_Mdouble_,function,suffix, args)
- #define __MATHDECL(type, function,suffix, args) \
-- __MATHDECL_1(type, function,suffix, args); \
-- __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
-+ __MATHDECL_1(type, function,suffix, args);
- #define __MATHCALLX(function,suffix, args, attrib) \
- __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
- #define __MATHDECLX(type, function,suffix, args, attrib) \
- __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
-- __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
-+ __MATHDECLI_MAINVARIANT(function)
- #define __MATHDECL_1(type, function,suffix, args) \
- extern type __MATH_PRECNAME(function,suffix) args __THROW
-+/* Decls which are also used internally in libm.
-+ Only the main variant is used internally, no need to try to avoid relocs
-+ for the {l,f} variants. */
-+#define __MATHCALLI(function,suffix, args) \
-+ __MATHDECLI (_Mdouble_,function,suffix, args)
-+#define __MATHDECLI(type, function,suffix, args) \
-+ __MATHDECL_1(type, function,suffix, args); \
-+ __MATHDECLI_MAINVARIANT(function)
-+/* Private helpers for purely macro impls below.
-+ Only make __foo{,f,l} visible but not (the macro-only) foo. */
-+#define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
-+ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) \
-+ __attribute__ (attrib); \
-+ libm_hidden_proto(__MATH_PRECNAME(__##function,suffix))
-
-+#define __MATHDECLI_MAINVARIANT libm_hidden_proto
- #define _Mdouble_ double
- #define __MATH_PRECNAME(name,r) __CONCAT(name,r)
- # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
-@@ -72,7 +90,9 @@
- #undef _Mdouble_
- #undef _Mdouble_BEGIN_NAMESPACE
- #undef _Mdouble_END_NAMESPACE
--#undef __MATH_PRECNAME
-+#undef __MATH_PRECNAME
-+#undef __MATHDECLI_MAINVARIANT
-+#define __MATHDECLI_MAINVARIANT(x)
-
- #if defined __USE_MISC || defined __USE_ISOC99
-
-Index: include/sys/sysinfo.h
-===================================================================
---- include/sys/sysinfo.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ include/sys/sysinfo.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -48,7 +48,7 @@
- /* Returns information on overall system statistics. */
- extern int sysinfo (struct sysinfo *__info) __THROW;
-
--
-+#if 0
- /* Return number of configured processors. */
- extern int get_nprocs_conf (void) __THROW;
-
-@@ -61,6 +61,7 @@
-
- /* Return number of available physical pages of memory in the system. */
- extern long int get_avphys_pages (void) __THROW;
-+#endif
-
- __END_DECLS
-
-Index: include/sys/mman.h
-===================================================================
---- include/sys/mman.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ include/sys/mman.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -157,11 +157,13 @@
- extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
- int __flags, ...) __THROW;
-
-+#ifdef __UCLIBC_LINUX_SPECIFIC__
- /* Remap arbitrary pages of a shared backing store within an existing
- VMA. */
- extern int remap_file_pages (void *__start, size_t __size, int __prot,
- size_t __pgoff, int __flags) __THROW;
- #endif
-+#endif
-
-
- /* Open shared memory segment. */
-Index: include/sched.h
-===================================================================
---- include/sched.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ include/sched.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -63,7 +63,7 @@
- extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Access macros for `cpu_set'. */
- #define CPU_SETSIZE __CPU_SETSIZE
- #define CPU_SET(cpu, cpusetp) __CPU_SET (cpu, cpusetp)
-Index: include/unistd.h
-===================================================================
---- include/unistd.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ include/unistd.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -869,10 +869,12 @@
- __THROW __nonnull ((1)) __wur;
- #endif
-
-+#if defined __UCLIBC_LINUX_SPECIFIC__
- /* Revoke access permissions to all processes currently communicating
- with the control terminal, and then send a SIGHUP signal to the process
- group of the control terminal. */
- extern int vhangup (void) __THROW;
-+#endif
-
- #if 0
- /* Revoke the access of all descriptors currently open on FILE. */
-Index: Makerules
-===================================================================
---- Makerules (.../tags/uClibc_0_9_30) (revision 25316)
-+++ Makerules (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -80,6 +80,7 @@
- pur_disp_compile.u = echo " "CC $(show_objs)
- pur_disp_compile.S = echo " "AS $(show_objs)
- pur_disp_compile.m = $(pur_disp_compile.c)
-+pur_disp_compile.mi= echo " "CPP-m $(show_objs)
- pur_disp_compile-m = echo " "CC-m $(show_objs)
- pur_disp_hcompile.u= echo " "HOSTCC $(show_objs)
- pur_disp_hcompile.o= echo " "HOSTCC-o $(show_objs)
-@@ -99,6 +100,7 @@
- sil_disp_compile.u = true
- sil_disp_compile.S = true
- sil_disp_compile.m = true
-+sil_disp_compile.mi= true
- sil_disp_compile-m = true
- sil_disp_hcompile.u= true
- sil_disp_hcompile.o= true
-@@ -118,6 +120,7 @@
- ver_disp_compile.u = echo $(cmd_compile.u)
- ver_disp_compile.S = echo $(cmd_compile.S)
- ver_disp_compile.m = echo $(cmd_compile.m)
-+ver_disp_compile.mi= echo $(cmd_compile.mi)
- ver_disp_compile-m = echo $(cmd_compile-m)
- ver_disp_hcompile.u= echo $(cmd_hcompile.u)
- ver_disp_hcompile.o= echo $(cmd_hcompile.o)
-@@ -137,6 +140,7 @@
- disp_compile.u = $($(DISP)_disp_compile.u)
- disp_compile.S = $($(DISP)_disp_compile.S)
- disp_compile.m = $($(DISP)_disp_compile.m)
-+disp_compile.mi= $($(DISP)_disp_compile.mi)
- disp_compile-m = $($(DISP)_disp_compile-m)
- disp_hcompile.u= $($(DISP)_disp_hcompile.u)
- disp_hcompile.o= $($(DISP)_disp_hcompile.o)
-@@ -189,6 +193,7 @@
- cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep)
- cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
- cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
-+cmd_compile.mi= $(cmd_compile.m:-c=-E -dD $(EXTRA_CPPFLAGS))
-
- cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@))
- cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
-@@ -211,7 +216,8 @@
- compile.s = $(call maybe_exec,compile.s)
- compile.S = @$(call maybe_exec,compile.S)
- compile.m = @$(call maybe_exec,compile.m)
--compile-m = @$(disp_compile-m) ; $(cmd_compile-m) ; $(cmd_t_strip)
-+compile.mi= $(call maybe_exec,compile.mi)
-+compile-m = @$(disp_compile-m) ; $(cmd_compile-m) && $(cmd_t_strip)
- do_strip = @$(disp_strip) ; $(cmd_strip)
- do_t_strip= @$(disp_t_strip) ; $(cmd_t_strip)
- do_unifdef= @$(disp_unifdef) ; $(cmd_unifdef)
-@@ -302,7 +308,7 @@
- $(Q)$(INSTALL) -d $(dir $@)
- $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@
- $(Q)echo "#include <features.h>" >> $@
-- $(Q)echo "const char __dl_ldso__[] __attribute__ ((section " \
-+ $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
- "(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@
-
- $(interp): $(top_builddir)lib/interp.c
-Index: utils/Makefile.in
-===================================================================
---- utils/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ utils/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -8,7 +8,10 @@
- CFLAGS-utils := -DNOT_IN_libc $(SSP_ALL_CFLAGS) -B$(top_builddir)lib -Wl,-rpath-link,$(top_builddir)lib
-
- CFLAGS-utils-common := -I$(top_srcdir)ldso/include -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=$(UCLIBC_LDSO)
-+CFLAGS-utils-shared :=
-+ifeq ($(UCLIBC_BUILD_PIE),y)
- CFLAGS-utils-shared := $(PIEFLAG) $(LDPIEFLAG)
-+endif
-
- CFLAGS-ldconfig := $(CFLAGS-utils-common)
-
-Index: libresolv/Makefile.in
-===================================================================
---- libresolv/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libresolv/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -7,7 +7,7 @@
-
- CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS)
-
--LDFLAGS-libresolv.so := $(LDFLAGS)
-+LDFLAGS-libresolv.so := $(LDFLAGS) $(call link.asneeded,-lc)
-
- LIBS-libresolv.so := $(LIBS)
-
-Index: ldso/ldso/ldso.c
-===================================================================
---- ldso/ldso/ldso.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ ldso/ldso/ldso.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -67,6 +67,7 @@
- unsigned long attribute_hidden _dl_skip_args = 0;
- const char *_dl_progname = UCLIBC_LDSO; /* The name of the executable being run */
- #include "dl-startup.c"
-+#include "dl-symbols.c"
- #include "dl-array.c"
- /* Forward function declarations */
- static int _dl_suid_ok(void);
-Index: ldso/ldso/dl-elf.c
-===================================================================
---- ldso/ldso/dl-elf.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ ldso/ldso/dl-elf.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -928,29 +928,3 @@
- {
- __dl_parse_dynamic_info(dpnt, dynamic_info, debug_addr, load_off);
- }
--
--/* we want this in ldso.so and libdl.a but nowhere else */
--#ifdef __USE_GNU
--#if defined IS_IN_rtld || (defined IS_IN_libdl && ! defined SHARED)
--extern __typeof(dl_iterate_phdr) __dl_iterate_phdr;
--int
--__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
--{
-- struct elf_resolve *l;
-- struct dl_phdr_info info;
-- int ret = 0;
--
-- for (l = _dl_loaded_modules; l != NULL; l = l->next) {
-- info.dlpi_addr = l->loadaddr;
-- info.dlpi_name = l->libname;
-- info.dlpi_phdr = l->ppnt;
-- info.dlpi_phnum = l->n_phent;
-- ret = callback (&info, sizeof (struct dl_phdr_info), data);
-- if (ret)
-- break;
-- }
-- return ret;
--}
--strong_alias(__dl_iterate_phdr, dl_iterate_phdr)
--#endif
--#endif
-Index: ldso/ldso/dl-hash.c
-===================================================================
---- ldso/ldso/dl-hash.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ ldso/ldso/dl-hash.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -32,15 +32,7 @@
-
-
- /* Various symbol table handling functions, including symbol lookup */
--
- /*
-- * This is the start of the linked list that describes all of the files present
-- * in the system with pointers to all of the symbol, string, and hash tables,
-- * as well as all of the other good stuff in the binary.
-- */
--struct elf_resolve *_dl_loaded_modules = NULL;
--
--/*
- * This is the list of modules that are loaded when the image is first
- * started. As we add more via dlopen, they get added into other
- * chains.
-Index: ldso/ldso/dl-symbols.c
-===================================================================
---- ldso/ldso/dl-symbols.c (.../tags/uClibc_0_9_30) (revision 0)
-+++ ldso/ldso/dl-symbols.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,21 @@
-+/*
-+ * This contains all symbols shared between
-+ * dynamic linker ld.so and into static libc
-+ *
-+ * Copyright (c) 2008 STMicroelectronics Ltd
-+ * Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+ *
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ *
-+ */
-+
-+/*
-+ * This is the start of the linked list that describes all of the files present
-+ * in the system with pointers to all of the symbol, string, and hash tables,
-+ * as well as all of the other good stuff in the binary.
-+ */
-+#include <ldso.h>
-+
-+struct elf_resolve *_dl_loaded_modules = NULL;
-+
-Index: Rules.mak
-===================================================================
---- Rules.mak (.../tags/uClibc_0_9_30) (revision 25316)
-+++ Rules.mak (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -417,22 +417,39 @@
-
- # Keep the check_gcc from being needlessly executed
- ifndef PIEFLAG
--ifneq ($(UCLIBC_BUILD_PIE),y)
--export PIEFLAG:=
--else
- export PIEFLAG:=$(call check_gcc,$(PIEFLAG_NAME),$(PICFLAG))
- endif
--endif
- # We need to keep track of both the CC PIE flag (above) as
- # well as the LD PIE flag (below) because we can't rely on
--# gcc passing -pie if we used -fPIE
-+# gcc passing -pie if we used -fPIE. We need to directly use -pie
-+# instead of -Wl,-pie as gcc picks up the wrong startfile/endfile
- ifndef LDPIEFLAG
--ifneq ($(UCLIBC_BUILD_PIE),y)
--export LDPIEFLAG:=
--else
--export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-Wl,-pie")
-+export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-pie")
- endif
-+
-+# Check for --as-needed support in linker
-+ifndef LD_FLAG_ASNEEDED
-+_LD_FLAG_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -- --as-needed)
-+ifneq ($(_LD_FLAG_ASNEEDED),)
-+export LD_FLAG_ASNEEDED:=--as-needed
- endif
-+endif
-+ifndef LD_FLAG_NO_ASNEEDED
-+ifdef LD_FLAG_ASNEEDED
-+export LD_FLAG_NO_ASNEEDED:=--no-as-needed
-+endif
-+endif
-+ifndef CC_FLAG_ASNEEDED
-+ifdef LD_FLAG_ASNEEDED
-+export CC_FLAG_ASNEEDED:=-Wl,$(LD_FLAG_ASNEEDED)
-+endif
-+endif
-+ifndef CC_FLAG_NO_ASNEEDED
-+ifdef LD_FLAG_NO_ASNEEDED
-+export CC_FLAG_NO_ASNEEDED:=-Wl,$(LD_FLAG_NO_ASNEEDED)
-+endif
-+endif
-+link.asneeded = $(if $(and $(CC_FLAG_ASNEEDED),$(CC_FLAG_NO_ASNEEDED)),$(CC_FLAG_ASNEEDED) $(1) $(CC_FLAG_NO_ASNEEDED))
-
- # Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
- ifndef ASNEEDED
-@@ -520,7 +537,9 @@
- # Be sure that binutils support it
- LDFLAGS_GNUHASH:=$(call check_ld,--hash-style=gnu)
- ifeq ($(LDFLAGS_GNUHASH),)
-+ifneq ($(filter-out install_headers,$(MAKECMDGOALS)),)
- $(error Your binutils don't support --hash-style option, while you want to use it)
-+endif
- else
- LDFLAGS_NOSTRIP += -Wl,$(LDFLAGS_GNUHASH)
- endif
-Index: libc/inet/ifaddrs.c
-===================================================================
---- libc/inet/ifaddrs.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/inet/ifaddrs.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -330,7 +330,7 @@
- that a RTM_NEWADDR index is not known to this map. */
- static int
- internal_function
--map_newlink (int index, struct ifaddrs_storage *ifas, int *map, int max)
-+map_newlink (int idx, struct ifaddrs_storage *ifas, int *map, int max)
- {
- int i;
-
-@@ -338,12 +338,12 @@
- {
- if (map[i] == -1)
- {
-- map[i] = index;
-+ map[i] = idx;
- if (i > 0)
- ifas[i - 1].ifa.ifa_next = &ifas[i].ifa;
- return i;
- }
-- else if (map[i] == index)
-+ else if (map[i] == idx)
- return i;
- }
- /* This should never be reached. If this will be reached, we have
-Index: libc/inet/getaddrinfo.c
-===================================================================
---- libc/inet/getaddrinfo.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/inet/getaddrinfo.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -186,7 +186,7 @@
- return seen;
- }
-
-- for (runp = ifa; runp != NULL; runp = runp->ifa_next)
-+ for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
- #if defined __UCLIBC_HAS_IPV4__
- if (runp->ifa_addr->sa_family == PF_INET)
- seen |= SEEN_IPV4;
-@@ -195,7 +195,7 @@
- if (runp->ifa_addr->sa_family == PF_INET6)
- seen |= SEEN_IPV6;
- #endif /* __UCLIBC_HAS_IPV6__ */
--
-+ }
- freeifaddrs(ifa);
- }
- #else
-Index: libc/sysdeps/linux/powerpc/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/powerpc/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/powerpc/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -189,7 +189,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -212,7 +212,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/arm/crt1.S
-===================================================================
---- libc/sysdeps/linux/arm/crt1.S (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/arm/crt1.S (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -238,7 +238,11 @@
-
- #ifdef __PIC__
- .L_GOT:
-+#ifdef __thumb__
-+ .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+4)
-+#else /* __thumb2__ */
- .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8)
-+#endif
- .word _fini(GOT)
- .word _init(GOT)
- .word main(GOT)
-Index: libc/sysdeps/linux/arm/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/arm/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/arm/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -189,7 +189,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -212,7 +212,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/sh64/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/sh64/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/sh64/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -164,7 +164,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -187,7 +187,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/m68k/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/m68k/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/m68k/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -185,7 +185,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -208,7 +208,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/alpha/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/alpha/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/alpha/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -159,7 +159,6 @@
- };
- #endif
-
--
- /* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
- #ifdef __USE_BSD
-@@ -181,7 +180,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -204,7 +203,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/microblaze/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/microblaze/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/microblaze/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -182,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -205,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/i960/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/i960/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/i960/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -182,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -205,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/common/bits/mathcalls.h
-===================================================================
---- libc/sysdeps/linux/common/bits/mathcalls.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/common/bits/mathcalls.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -52,59 +52,45 @@
-
- _Mdouble_BEGIN_NAMESPACE
- /* Arc cosine of X. */
--__MATHCALL (acos,, (_Mdouble_ __x));
--libm_hidden_proto(acos)
-+__MATHCALLI (acos,, (_Mdouble_ __x));
- /* Arc sine of X. */
--__MATHCALL (asin,, (_Mdouble_ __x));
--libm_hidden_proto(asin)
-+__MATHCALLI (asin,, (_Mdouble_ __x));
- /* Arc tangent of X. */
--__MATHCALL (atan,, (_Mdouble_ __x));
--libm_hidden_proto(atan)
-+__MATHCALLI (atan,, (_Mdouble_ __x));
- /* Arc tangent of Y/X. */
--__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
--libm_hidden_proto(atan2)
-+__MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x));
-
- /* Cosine of X. */
--__MATHCALL (cos,, (_Mdouble_ __x));
--libm_hidden_proto(cos)
-+__MATHCALLI (cos,, (_Mdouble_ __x));
- /* Sine of X. */
--__MATHCALL (sin,, (_Mdouble_ __x));
--libm_hidden_proto(sin)
-+__MATHCALLI (sin,, (_Mdouble_ __x));
- /* Tangent of X. */
--__MATHCALL (tan,, (_Mdouble_ __x));
--libm_hidden_proto(tan)
-+__MATHCALLI (tan,, (_Mdouble_ __x));
-
- /* Hyperbolic functions. */
-
- /* Hyperbolic cosine of X. */
--__MATHCALL (cosh,, (_Mdouble_ __x));
--libm_hidden_proto(cosh)
-+__MATHCALLI (cosh,, (_Mdouble_ __x));
- /* Hyperbolic sine of X. */
--__MATHCALL (sinh,, (_Mdouble_ __x));
--libm_hidden_proto(sinh)
-+__MATHCALLI (sinh,, (_Mdouble_ __x));
- /* Hyperbolic tangent of X. */
--__MATHCALL (tanh,, (_Mdouble_ __x));
--libm_hidden_proto(tanh)
-+__MATHCALLI (tanh,, (_Mdouble_ __x));
- _Mdouble_END_NAMESPACE
-
- #if 0 /*def __USE_GNU*/
- /* Cosine and sine of X. */
- __MATHDECL (void,sincos,,
- (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
--libm_hidden_proto(sincos)
- #endif
-
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Hyperbolic arc cosine of X. */
--__MATHCALL (acosh,, (_Mdouble_ __x));
--libm_hidden_proto(acosh)
-+__MATHCALLI (acosh,, (_Mdouble_ __x));
- /* Hyperbolic arc sine of X. */
--__MATHCALL (asinh,, (_Mdouble_ __x));
--libm_hidden_proto(asinh)
-+__MATHCALLI (asinh,, (_Mdouble_ __x));
- /* Hyperbolic arc tangent of X. */
--__MATHCALL (atanh,, (_Mdouble_ __x));
--libm_hidden_proto(atanh)
-+__MATHCALLI (atanh,, (_Mdouble_ __x));
- __END_NAMESPACE_C99
- #endif
-
-@@ -112,64 +98,51 @@
-
- _Mdouble_BEGIN_NAMESPACE
- /* Exponential function of X. */
--__MATHCALL (exp,, (_Mdouble_ __x));
--libm_hidden_proto(exp)
-+__MATHCALLI (exp,, (_Mdouble_ __x));
-
- /* Break VALUE into a normalized fraction and an integral power of 2. */
--__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent));
--libm_hidden_proto(frexp)
-+__MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent));
-
- /* X times (two to the EXP power). */
--__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent));
--libm_hidden_proto(ldexp)
-+__MATHCALLI (ldexp,, (_Mdouble_ __x, int __exponent));
-
- /* Natural logarithm of X. */
--__MATHCALL (log,, (_Mdouble_ __x));
--libm_hidden_proto(log)
-+__MATHCALLI (log,, (_Mdouble_ __x));
-
- /* Base-ten logarithm of X. */
--__MATHCALL (log10,, (_Mdouble_ __x));
--libm_hidden_proto(log10)
-+__MATHCALLI (log10,, (_Mdouble_ __x));
-
- /* Break VALUE into integral and fractional parts. */
--__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
--libm_hidden_proto(modf)
-+__MATHCALLI (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
- _Mdouble_END_NAMESPACE
-
- #if 0 /*def __USE_GNU*/
- /* A function missing in all standards: compute exponent to base ten. */
- __MATHCALL (exp10,, (_Mdouble_ __x));
--libm_hidden_proto(exp10)
- /* Another name occasionally used. */
- __MATHCALL (pow10,, (_Mdouble_ __x));
--libm_hidden_proto(pow10)
- #endif
-
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Return exp(X) - 1. */
--__MATHCALL (expm1,, (_Mdouble_ __x));
--libm_hidden_proto(expm1)
-+__MATHCALLI (expm1,, (_Mdouble_ __x));
-
- /* Return log(1 + X). */
--__MATHCALL (log1p,, (_Mdouble_ __x));
--libm_hidden_proto(log1p)
-+__MATHCALLI (log1p,, (_Mdouble_ __x));
-
- /* Return the base 2 signed integral exponent of X. */
--__MATHCALL (logb,, (_Mdouble_ __x));
--libm_hidden_proto(logb)
-+__MATHCALLI (logb,, (_Mdouble_ __x));
- __END_NAMESPACE_C99
- #endif
-
- #ifdef __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Compute base-2 exponential of X. */
--__MATHCALL (exp2,, (_Mdouble_ __x));
--libm_hidden_proto(exp2)
-+__MATHCALLI (exp2,, (_Mdouble_ __x));
-
- /* Compute base-2 logarithm of X. */
- __MATHCALL (log2,, (_Mdouble_ __x));
--libm_hidden_proto(log2)
- __END_NAMESPACE_C99
- #endif
-
-@@ -178,27 +151,23 @@
-
- _Mdouble_BEGIN_NAMESPACE
- /* Return X to the Y power. */
--__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(pow)
-+__MATHCALLI (pow,, (_Mdouble_ __x, _Mdouble_ __y));
-
- /* Return the square root of X. */
--__MATHCALL (sqrt,, (_Mdouble_ __x));
--libm_hidden_proto(sqrt)
-+__MATHCALLI (sqrt,, (_Mdouble_ __x));
- _Mdouble_END_NAMESPACE
-
- #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Return `sqrt(X*X + Y*Y)'. */
--__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(hypot)
-+__MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
- __END_NAMESPACE_C99
- #endif
-
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Return the cube root of X. */
--__MATHCALL (cbrt,, (_Mdouble_ __x));
--libm_hidden_proto(cbrt)
-+__MATHCALLI (cbrt,, (_Mdouble_ __x));
- __END_NAMESPACE_C99
- #endif
-
-@@ -208,56 +177,46 @@
- _Mdouble_BEGIN_NAMESPACE
- /* Smallest integral value not less than X. */
- __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__));
--libm_hidden_proto(ceil)
-
- /* Absolute value of X. */
- __MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
--libm_hidden_proto(fabs)
-
- /* Largest integer not greater than X. */
- __MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
--libm_hidden_proto(floor)
-
- /* Floating-point modulo remainder of X/Y. */
--__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(fmod)
-+__MATHCALLI (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
-
-
- /* Return 0 if VALUE is finite or NaN, +1 if it
- is +Infinity, -1 if it is -Infinity. */
--__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(__isinf)
-+__MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__));
-
- /* Return nonzero if VALUE is finite and not NaN. */
--__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(__finite)
-+__MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__));
- _Mdouble_END_NAMESPACE
-
- #ifdef __USE_MISC
-+#if 0
- /* Return 0 if VALUE is finite or NaN, +1 if it
- is +Infinity, -1 if it is -Infinity. */
--__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(isinf)
-+__MATHDECL_PRIV (int,isinf,, (_Mdouble_ __value), (__const__));
-
- /* Return nonzero if VALUE is finite and not NaN. */
--__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(finite)
--
-+__MATHDECL_PRIV (int,finite,, (_Mdouble_ __value), (__const__));
-+#endif
- /* Return the remainder of X/Y. */
- __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(drem)
-
-
- /* Return the fractional part of X after dividing out `ilogb (X)'. */
- __MATHCALL (significand,, (_Mdouble_ __x));
--libm_hidden_proto(significand)
- #endif /* Use misc. */
-
- #if defined __USE_MISC || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Return X with its signed changed to Y's. */
- __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
--libm_hidden_proto(copysign)
- __END_NAMESPACE_C99
- #endif
-
-@@ -265,60 +224,46 @@
- __BEGIN_NAMESPACE_C99
- /* Return representation of NaN for double type. */
- __MATHCALLX (nan,, (__const char *__tagb), (__const__));
--libm_hidden_proto(nan)
- __END_NAMESPACE_C99
- #endif
-
-
- /* Return nonzero if VALUE is not a number. */
--__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(__isnan)
-+__MATHDECL_PRIV (int,__isnan,, (_Mdouble_ __value), (__const__));
-
- #if defined __USE_MISC || defined __USE_XOPEN
- /* Return nonzero if VALUE is not a number. */
--__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
--libm_hidden_proto(isnan)
-+__MATHDECL_PRIV (int,isnan,, (_Mdouble_ __value), (__const__));
-
- /* Bessel functions. */
- __MATHCALL (j0,, (_Mdouble_));
--libm_hidden_proto(j0)
- __MATHCALL (j1,, (_Mdouble_));
--libm_hidden_proto(j1)
- __MATHCALL (jn,, (int, _Mdouble_));
--libm_hidden_proto(jn)
- __MATHCALL (y0,, (_Mdouble_));
--libm_hidden_proto(y0)
- __MATHCALL (y1,, (_Mdouble_));
--libm_hidden_proto(y1)
- __MATHCALL (yn,, (int, _Mdouble_));
--libm_hidden_proto(yn)
- #endif
-
-
- #if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* Error and gamma functions. */
--__MATHCALL (erf,, (_Mdouble_));
--libm_hidden_proto(erf)
--__MATHCALL (erfc,, (_Mdouble_));
--libm_hidden_proto(erfc)
--__MATHCALL (lgamma,, (_Mdouble_));
--libm_hidden_proto(lgamma)
-+__MATHCALLI (erf,, (_Mdouble_));
-+__MATHCALLI (erfc,, (_Mdouble_));
-+__MATHCALLI (lgamma,, (_Mdouble_));
- __END_NAMESPACE_C99
- #endif
-
- #ifdef __USE_ISOC99
- __BEGIN_NAMESPACE_C99
- /* True gamma function. */
--__MATHCALL (tgamma,, (_Mdouble_));
--libm_hidden_proto(tgamma)
-+__MATHCALLI (tgamma,, (_Mdouble_));
- __END_NAMESPACE_C99
- #endif
-
- #if defined __USE_MISC || defined __USE_XOPEN
- /* Obsolete alias for `lgamma'. */
- __MATHCALL (gamma,, (_Mdouble_));
--libm_hidden_proto(gamma)
- #endif
-
- #ifdef __USE_MISC
-@@ -326,7 +271,6 @@
- `signgam'. The reentrant version instead takes a pointer and stores
- the value through it. */
- __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp));
--libm_hidden_proto(lgamma_r)
- #endif
-
-
-@@ -334,103 +278,80 @@
- __BEGIN_NAMESPACE_C99
- /* Return the integer nearest X in the direction of the
- prevailing rounding mode. */
--__MATHCALL (rint,, (_Mdouble_ __x));
--libm_hidden_proto(rint)
-+__MATHCALLI (rint,, (_Mdouble_ __x));
-
- /* Return X + epsilon if X < Y, X - epsilon if X > Y. */
- __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
--libm_hidden_proto(nextafter)
- # if defined __USE_ISOC99 && !defined __LDBL_COMPAT
- __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
--libm_hidden_proto(nexttoward)
- # endif
-
- /* Return the remainder of integer divison X / Y with infinite precision. */
--__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(remainder)
-+__MATHCALLI (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
-
- # if defined __USE_MISC || defined __USE_ISOC99
- /* Return X times (2 to the Nth power). */
--__MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
--libm_hidden_proto(scalbn)
-+__MATHCALLI (scalbn,, (_Mdouble_ __x, int __n));
- # endif
-
- /* Return the binary exponent of X, which must be nonzero. */
--__MATHDECL (int,ilogb,, (_Mdouble_ __x));
--libm_hidden_proto(ilogb)
-+__MATHDECLI (int,ilogb,, (_Mdouble_ __x));
- #endif
-
- #ifdef __USE_ISOC99
- /* Return X times (2 to the Nth power). */
--__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n));
--libm_hidden_proto(scalbln)
-+__MATHCALLI (scalbln,, (_Mdouble_ __x, long int __n));
-
- /* Round X to integral value in floating-point format using current
- rounding direction, but do not raise inexact exception. */
--__MATHCALL (nearbyint,, (_Mdouble_ __x));
--libm_hidden_proto(nearbyint)
-+__MATHCALLI (nearbyint,, (_Mdouble_ __x));
-
- /* Round X to nearest integral value, rounding halfway cases away from
- zero. */
- __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
--libm_hidden_proto(round)
-
- /* Round X to the integral value in floating-point format nearest but
- not larger in magnitude. */
- __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__));
--libm_hidden_proto(trunc)
-
- /* Compute remainder of X and Y and put in *QUO a value with sign of x/y
- and magnitude congruent `mod 2^n' to the magnitude of the integral
- quotient x/y, with n >= 3. */
--__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo));
--libm_hidden_proto(remquo)
-+__MATHCALLI (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo));
-
-
- /* Conversion functions. */
-
- /* Round X to nearest integral value according to current rounding
- direction. */
--__MATHDECL (long int,lrint,, (_Mdouble_ __x));
--libm_hidden_proto(lrint)
--__MATHDECL (long long int,llrint,, (_Mdouble_ __x));
--libm_hidden_proto(llrint)
-+__MATHDECLI (long int,lrint,, (_Mdouble_ __x));
-+__MATHDECLI (long long int,llrint,, (_Mdouble_ __x));
-
- /* Round X to nearest integral value, rounding halfway cases away from
- zero. */
--__MATHDECL (long int,lround,, (_Mdouble_ __x));
--libm_hidden_proto(lround)
--__MATHDECL (long long int,llround,, (_Mdouble_ __x));
--libm_hidden_proto(llround)
-+__MATHDECLI (long int,lround,, (_Mdouble_ __x));
-+__MATHDECLI (long long int,llround,, (_Mdouble_ __x));
-
-
- /* Return positive difference between X and Y. */
--__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(fdim)
-+__MATHCALLI (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
-
- /* Return maximum numeric value from X and Y. */
--__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(fmax)
-+__MATHCALLI (fmax,, (_Mdouble_ __x, _Mdouble_ __y));
-
- /* Return minimum numeric value from X and Y. */
--__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y));
--libm_hidden_proto(fmin)
-+__MATHCALLI (fmin,, (_Mdouble_ __x, _Mdouble_ __y));
-
-
- /* Classify given number. */
--__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
-- __attribute__ ((__const__));
--libm_hidden_proto(__fpclassify)
-+__MATHDECL_PRIV (int, fpclassify,, (_Mdouble_ __value), (__const__));
-
- /* Test for negative number. */
--__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
-- __attribute__ ((__const__));
--libm_hidden_proto(__signbit)
-+__MATHDECL_PRIV (int, signbit,, (_Mdouble_ __value), (__const__));
-
-
- /* Multiply-add function computed as a ternary operation. */
--__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
--libm_hidden_proto(fma)
-+__MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
- #endif /* Use ISO C99. */
-
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-@@ -440,5 +361,4 @@
- #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
- /* Return X times (2 to the Nth power). */
- __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
--libm_hidden_proto(scalb)
- #endif
-Index: libc/sysdeps/linux/hppa/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/hppa/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/hppa/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -176,7 +176,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -199,7 +199,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/i386/bits/kernel_types.h
-===================================================================
---- libc/sysdeps/linux/i386/bits/kernel_types.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/i386/bits/kernel_types.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -7,9 +7,14 @@
-
- /* a hack for compiling a 32 bit user space with 64 bit
- * kernel on x86_64 */
--#if !defined(__ARCH_I386_POSIX_TYPES_H) && !defined(_ASM_X86_64_POSIX_TYPES_H)
-+#if !defined(__ARCH_I386_POSIX_TYPES_H) && \
-+ !defined(_ASM_X86_64_POSIX_TYPES_H) && \
-+ !defined(_ASM_X86_POSIX_TYPES_32_H) && \
-+ !defined(_ASM_X86_POSIX_TYPES_64_H)
- #define _ASM_X86_64_POSIX_TYPES_H
- #define __ARCH_I386_POSIX_TYPES_H
-+#define _ASM_X86_POSIX_TYPES_32_H
-+#define _ASM_X86_POSIX_TYPES_64_H
-
- typedef unsigned short __kernel_dev_t;
- typedef unsigned long __kernel_ino_t;
-Index: libc/sysdeps/linux/i386/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/i386/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/i386/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -189,7 +189,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -212,7 +212,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/nios2/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/nios2/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/nios2/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -185,7 +185,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -208,7 +208,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/avr32/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/avr32/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/avr32/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -167,8 +167,8 @@
- # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
- #endif
-
--#ifdef __USE_GNU
-
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing
-Index: libc/sysdeps/linux/frv/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/frv/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/frv/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -164,7 +164,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -187,7 +187,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/vax/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/vax/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/vax/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -162,7 +162,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -185,7 +185,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/x86_64/bits/kernel_types.h
-===================================================================
---- libc/sysdeps/linux/x86_64/bits/kernel_types.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/x86_64/bits/kernel_types.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -4,8 +4,17 @@
- * our private content, and not the kernel header, will win.
- * -Erik
- */
--#ifndef _ASM_X86_64_POSIX_TYPES_H
-+
-+/* a hack for compiling a 32 bit user space with 64 bit
-+ * kernel on x86_64 */
-+#if !defined(__ARCH_I386_POSIX_TYPES_H) && \
-+ !defined(_ASM_X86_64_POSIX_TYPES_H) && \
-+ !defined(_ASM_X86_POSIX_TYPES_32_H) && \
-+ !defined(_ASM_X86_POSIX_TYPES_64_H)
- #define _ASM_X86_64_POSIX_TYPES_H
-+#define __ARCH_I386_POSIX_TYPES_H
-+#define _ASM_X86_POSIX_TYPES_32_H
-+#define _ASM_X86_POSIX_TYPES_64_H
-
- typedef unsigned long __kernel_dev_t;
- typedef unsigned long __kernel_ino_t;
-Index: libc/sysdeps/linux/x86_64/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/x86_64/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/x86_64/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -203,7 +203,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -226,7 +226,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/cris/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/cris/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/cris/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -186,7 +186,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -209,7 +209,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/h8300/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/h8300/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/h8300/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -182,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -205,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/v850/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/v850/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/v850/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -182,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -205,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/xtensa/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/xtensa/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/xtensa/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -186,7 +186,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -209,7 +209,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/ia64/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/ia64/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/ia64/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -161,7 +161,6 @@
- };
- #endif
-
--
- /* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
- #ifdef __USE_BSD
-@@ -183,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -206,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/e1/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/e1/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/e1/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -182,7 +182,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -205,7 +205,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-@@ -231,4 +231,4 @@
-
- #endif
- __END_DECLS
--
-+#endif /* LINUX_SPECIFIC */
-Index: libc/sysdeps/linux/mips/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/mips/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/mips/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -209,7 +209,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -232,7 +232,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/mips/bits/socket.h
-===================================================================
---- libc/sysdeps/linux/mips/bits/socket.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/mips/bits/socket.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -268,8 +268,8 @@
- + CMSG_ALIGN (sizeof (struct cmsghdr)))
- #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
--extern struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr,
-- struct cmsghdr *__cmsg)) __THROW;
-+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
-+ struct cmsghdr *__cmsg) __THROW;
- #ifdef __USE_EXTERN_INLINES
- # ifndef _EXTERN_INLINE
- # define _EXTERN_INLINE extern __inline
-Index: libc/sysdeps/linux/nios/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/nios/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/nios/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -185,7 +185,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -208,7 +208,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/sparc/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/sparc/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/sparc/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -208,7 +208,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -231,7 +231,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/sh/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/sh/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/sh/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -189,7 +189,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -212,7 +212,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/sysdeps/linux/bfin/bits/fcntl.h
-===================================================================
---- libc/sysdeps/linux/bfin/bits/fcntl.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/sysdeps/linux/bfin/bits/fcntl.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -185,7 +185,7 @@
- #endif
-
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
- /* Flags for SYNC_FILE_RANGE. */
- # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
-@@ -208,7 +208,7 @@
-
- __BEGIN_DECLS
-
--#ifdef __USE_GNU
-+#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
-
- /* Provide kernel hint to read ahead. */
- extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
-Index: libc/misc/Makefile.in
-===================================================================
---- libc/misc/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/misc/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -12,6 +12,7 @@
- include $(top_srcdir)libc/misc/ctype/Makefile.in
- include $(top_srcdir)libc/misc/dirent/Makefile.in
- include $(top_srcdir)libc/misc/error/Makefile.in
-+include $(top_srcdir)libc/misc/elf/Makefile.in
- include $(top_srcdir)libc/misc/file/Makefile.in
- include $(top_srcdir)libc/misc/fnmatch/Makefile.in
- include $(top_srcdir)libc/misc/ftw/Makefile.in
-Index: libc/misc/internals/__uClibc_main.c
-===================================================================
---- libc/misc/internals/__uClibc_main.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/misc/internals/__uClibc_main.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -72,6 +72,11 @@
- # endif
- # endif
-
-+/*
-+ * Needed to initialize _dl_phdr when statically linked
-+ */
-+
-+void internal_function _dl_aux_init (ElfW(auxv_t) *av);
- #endif /* !SHARED */
-
- /*
-@@ -114,9 +119,8 @@
- #endif
-
- /*
-- * Declare the __environ global variable and create a strong alias environ.
-- * Note: Apparently we must initialize __environ to ensure that the strong
-- * environ symbol is also included.
-+ * Declare the __environ global variable and create a weak alias environ.
-+ * This must be initialized; we cannot have a weak alias into bss.
- */
- char **__environ = 0;
- weak_alias(__environ, environ)
-@@ -310,7 +314,13 @@
- }
- aux_dat += 2;
- }
-+#ifndef SHARED
-+ /* Get the program headers (_dl_phdr) from the aux vector
-+ It will be used into __libc_setup_tls. */
-+
-+ _dl_aux_init (auxvt);
- #endif
-+#endif
-
- /* We need to initialize uClibc. If we are dynamically linked this
- * may have already been completed by the shared lib loader. We call
-Index: libc/misc/wchar/wchar.c
-===================================================================
---- libc/misc/wchar/wchar.c (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libc/misc/wchar/wchar.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -1143,7 +1143,14 @@
- {
- int count;
- wchar_t wc;
-+ size_t i;
-
-+ for (i = 0 ; (i < n) && pwcs[i] ; i++) {
-+ if (pwcs[i] != (pwcs[i] & 0x7f)) {
-+ return -1;
-+ }
-+ }
-+
- for (count = 0 ; n && (wc = *pwcs++) ; n--) {
- if (wc <= 0xff) {
- /* If we're here, wc != 0. */
-@@ -1246,7 +1253,7 @@
- "\x08\xec""UCS-4\x00" /* always BE */
- "\x0a\xec""UCS-4BE\x00"
- "\x0a\xed""UCS-4LE\x00"
-- "\x09\fe4""UTF-32\x00" /* platform endian with BOM */
-+ "\x09\xe4""UTF-32\x00" /* platform endian with BOM */
- "\x0b\xe4""UTF-32BE\x00"
- "\x0b\xe5""UTF-32LE\x00"
- "\x08\xe2""UCS-2\x00" /* always BE */
-Index: libc/misc/elf/Makefile.in
-===================================================================
---- libc/misc/elf/Makefile.in (.../tags/uClibc_0_9_30) (revision 0)
-+++ libc/misc/elf/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,20 @@
-+# Copyright (C) 2008 STMicroelectronics Ltd.
-+# Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+#
-+
-+libc_a_CSRC = dl-support.c dl-core.c dl-iterate-phdr.c
-+CFLAGS-dl-iterate-phdr.c=-D_GNU_SOURCE -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include
-+CFLAGS-dl-core.c=-I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include
-+
-+MISC_ELF_OUT:=$(top_builddir)libc/misc/elf
-+MISC_ELF_OBJ:=$(patsubst %.c,$(MISC_ELF_OUT)/%.o,$(libc_a_CSRC))
-+
-+libc-static-y += $(MISC_ELF_OBJ)
-+libc-shared-y += $(MISC_ELF_OUT)/dl-iterate-phdr.oS
-+
-+objclean-y+= misc_elf_objclean
-+
-+misc_elf_objclean:
-+ $(RM) $(MISC_ELF_OUT)/*.{o,os,oS}
-Index: libc/misc/elf/dl-core.c
-===================================================================
---- libc/misc/elf/dl-core.c (.../tags/uClibc_0_9_30) (revision 0)
-+++ libc/misc/elf/dl-core.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,20 @@
-+/*
-+ * This contains all symbols and functions to support
-+ * dynamic linking into static libc.
-+
-+ * Copyright (c) 2008 STMicroelectronics Ltd
-+ * Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+ *
-+ * Based on draft work by Peter S. Mazinger <ps.m@gmx.net>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ *
-+ */
-+
-+#ifdef SHARED
-+#error "This file is not suitable for linking into dynamic libc"
-+#else
-+/* Include ldso symbols and functions used into static libc */
-+#include "../../../ldso/ldso/dl-symbols.c"
-+#endif
-+
-Index: libc/misc/elf/dl-iterate-phdr.c
-===================================================================
---- libc/misc/elf/dl-iterate-phdr.c (.../tags/uClibc_0_9_30) (revision 0)
-+++ libc/misc/elf/dl-iterate-phdr.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,76 @@
-+/* Get loaded objects program headers.
-+
-+ Based on GNU C library (file: libc/elf/dl-iteratephdr.c)
-+
-+ Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc.
-+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
-+
-+ Copyright (C) 2008 STMicroelectronics Ltd.
-+ Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+
-+ Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+*/
-+
-+
-+#include <link.h>
-+#include <ldso.h>
-+
-+/* we want this in libc but nowhere else */
-+#ifdef __USE_GNU
-+
-+extern __typeof(dl_iterate_phdr) __dl_iterate_phdr;
-+
-+hidden_proto(__dl_iterate_phdr)
-+int
-+__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
-+{
-+ struct elf_resolve *l;
-+ struct dl_phdr_info info;
-+ int ret = 0;
-+
-+ for (l = _dl_loaded_modules; l != NULL; l = l->next) {
-+ info.dlpi_addr = l->loadaddr;
-+ info.dlpi_name = l->libname;
-+ info.dlpi_phdr = l->ppnt;
-+ info.dlpi_phnum = l->n_phent;
-+ ret = callback (&info, sizeof (struct dl_phdr_info), data);
-+ if (ret)
-+ break;
-+ }
-+ return ret;
-+}
-+hidden_def (__dl_iterate_phdr)
-+
-+# ifdef SHARED
-+
-+weak_alias(__dl_iterate_phdr, dl_iterate_phdr)
-+
-+# else
-+
-+/* dl-support.c defines these and initializes them early on. */
-+extern ElfW(Phdr) *_dl_phdr;
-+extern size_t _dl_phnum;
-+
-+int
-+dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
-+ size_t size, void *data), void *data)
-+{
-+ if (_dl_phnum != 0)
-+ {
-+ /* This entry describes this statically-linked program itself. */
-+ struct dl_phdr_info info;
-+ int ret;
-+ info.dlpi_addr = 0;
-+ info.dlpi_name = "";
-+ info.dlpi_phdr = _dl_phdr;
-+ info.dlpi_phnum = _dl_phnum;
-+ ret = (*callback) (&info, sizeof (struct dl_phdr_info), data);
-+ if (ret)
-+ return ret;
-+ }
-+ /* Then invoke callback on loaded modules, if any */
-+ return __dl_iterate_phdr (callback, data);
-+}
-+
-+# endif
-+#endif
-Index: libc/misc/elf/dl-support.c
-===================================================================
---- libc/misc/elf/dl-support.c (.../tags/uClibc_0_9_30) (revision 0)
-+++ libc/misc/elf/dl-support.c (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,29 @@
-+/*
-+ * Support for dynamic linking code in static libc.
-+ * Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+ *
-+ * Partially based on GNU C Library (file: libc/elf/dl-support.c)
-+ *
-+ * Copyright (C) 2008 STMicroelectronics Ltd.
-+ * Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ *
-+ */
-+
-+#include <link.h>
-+#include <elf.h>
-+
-+ElfW(Phdr) *_dl_phdr;
-+size_t _dl_phnum;
-+
-+void
-+internal_function
-+_dl_aux_init (ElfW(auxv_t) *av)
-+{
-+ /* Get the program headers base address from the aux vect */
-+ _dl_phdr = (ElfW(Phdr) *) av[AT_PHDR].a_un.a_val;
-+
-+ /* Get the number of program headers from the aux vect */
-+ _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
-+}
-Index: libc/misc/elf/Makefile
-===================================================================
---- libc/misc/elf/Makefile (.../tags/uClibc_0_9_30) (revision 0)
-+++ libc/misc/elf/Makefile (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -0,0 +1,12 @@
-+# Copyright (C) 2008 STMicroelectronics Ltd.
-+# Author: Carmelo Amoroso <carmelo.amoroso@st.com>
-+
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+#
-+
-+top_srcdir=../../../
-+top_builddir=../../../
-+all: objs
-+include $(top_builddir)Rules.mak
-+include Makefile.in
-+include $(top_srcdir)Makerules
-Index: librt/Makefile.in
-===================================================================
---- librt/Makefile.in (.../tags/uClibc_0_9_30) (revision 25316)
-+++ librt/Makefile.in (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -7,7 +7,7 @@
-
- CFLAGS-librt := -DNOT_IN_libc -DIS_IN_librt $(SSP_ALL_CFLAGS)
-
--LDFLAGS-librt.so := $(LDFLAGS)
-+LDFLAGS-librt.so := $(LDFLAGS) $(call link.asneeded,-lc)
-
- LIBS-librt.so := $(LIBS)
-
-Index: libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
-===================================================================
---- libpthread/linuxthreads.old/sysdeps/pthread/pthread.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libpthread/linuxthreads.old/sysdeps/pthread/pthread.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -293,7 +293,7 @@
-
- #ifdef __USE_GNU
- /* Initialize thread attribute *ATTR with attributes corresponding to the
-- already running thread TH. It shall be called on unitialized ATTR
-+ already running thread TH. It shall be called on uninitialized ATTR
- and destroyed with pthread_attr_destroy when no longer needed. */
- extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
- #endif
-Index: libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
-===================================================================
---- libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -25,40 +25,13 @@
- #define _PT_MACHINE_H 1
-
- #include <features.h>
-+#include <sgidefs.h>
-+#include <sys/tas.h>
-
- #ifndef PT_EI
- # define PT_EI __extern_always_inline
- #endif
-
--/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. */
--static __inline__ int
--__NTH (_test_and_set (int *p, int v))
--{
-- int r, t;
--
-- __asm__ __volatile__
-- ("/* Inline test and set */\n"
-- "1:\n\t"
-- ".set push\n\t"
-- ".set mips2\n\t"
-- "ll %0,%3\n\t"
-- "move %1,%4\n\t"
-- "beq %0,%4,2f\n\t"
-- "sc %1,%2\n\t"
-- ".set pop\n\t"
-- "beqz %1,1b\n"
-- "2:\n\t"
-- "/* End test and set */"
-- : "=&r" (r), "=&r" (t), "=m" (*p)
-- : "m" (*p), "r" (v)
-- : "memory");
--
-- return r;
--}
--
--
- /* Spinlock implementation; required. */
-
- PT_EI long int
-@@ -86,12 +59,22 @@
- ("/* Inline compare & swap */\n"
- "1:\n\t"
- ".set push\n\t"
-+#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-+#endif
-+#if _MIPS_SIM == _ABI64
-+ "lld %1,%5\n\t"
-+#else
- "ll %1,%5\n\t"
-+#endif
- "move %0,$0\n\t"
- "bne %1,%3,2f\n\t"
- "move %0,%4\n\t"
-+#if _MIPS_SIM == _ABI64
-+ "scd %0,%2\n\t"
-+#else
- "sc %0,%2\n\t"
-+#endif
- ".set pop\n\t"
- "beqz %0,1b\n"
- "2:\n\t"
-Index: libpthread/linuxthreads/sysdeps/pthread/pthread.h
-===================================================================
---- libpthread/linuxthreads/sysdeps/pthread/pthread.h (.../tags/uClibc_0_9_30) (revision 25316)
-+++ libpthread/linuxthreads/sysdeps/pthread/pthread.h (.../branches/uClibc_0_9_30) (revision 25316)
-@@ -290,7 +290,7 @@
-
- #ifdef __USE_GNU
- /* Initialize thread attribute *ATTR with attributes corresponding to the
-- already running thread TH. It shall be called on unitialized ATTR
-+ already running thread TH. It shall be called on uninitialized ATTR
- and destroyed with pthread_attr_destroy when no longer needed. */
- extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
- #endif
diff --git a/core/uclibc/uclibc-0.9.30.1-resolv.patch b/core/uclibc/uclibc-0.9.30.1-resolv.patch
new file mode 100644
index 00000000..55b7d991
--- /dev/null
+++ b/core/uclibc/uclibc-0.9.30.1-resolv.patch
@@ -0,0 +1,13 @@
+diff -ru uClibc-0.9.30.1.orig/libc/inet/resolv.c uClibc-0.9.30.1/libc/inet/resolv.c
+--- uClibc-0.9.30.1.orig/libc/inet/resolv.c 2009-03-10 15:32:14.000000000 +0000
++++ uClibc-0.9.30.1/libc/inet/resolv.c 2009-03-10 15:39:20.000000000 +0000
+@@ -1331,7 +1331,8 @@
+ i = __dns_lookup(dname, type, __nameserversXX, __nameserverXX, &packet, &a);
+
+ if (i < 0) {
+- h_errno = TRY_AGAIN;
++ if (!h_errno) /* TODO: can this ever happen? */
++ h_errno = TRY_AGAIN;
+ return -1;
+ }
+