summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/sysdeps/linux/common/getegid.c7
-rw-r--r--libc/sysdeps/linux/common/getgid.c3
-rw-r--r--libcrypt/Makefile66
-rw-r--r--libcrypt/Makefile.in14
-rw-r--r--libcrypt/crypt.c24
-rw-r--r--libcrypt/des.c2
-rw-r--r--libcrypt/md5.c2
-rw-r--r--libintl/Makefile69
-rw-r--r--libintl/Makefile.in14
-rw-r--r--libm/Makefile134
-rw-r--r--libm/Makefile.in14
-rw-r--r--libm/e_acos.c4
-rw-r--r--libm/e_acosh.c4
-rw-r--r--libm/e_asin.c4
-rw-r--r--libm/e_atan2.c4
-rw-r--r--libm/e_atanh.c4
-rw-r--r--libm/e_cosh.c4
-rw-r--r--libm/e_exp.c4
-rw-r--r--libm/e_fmod.c4
-rw-r--r--libm/e_gamma.c4
-rw-r--r--libm/e_gamma_r.c4
-rw-r--r--libm/e_hypot.c4
-rw-r--r--libm/e_j0.c8
-rw-r--r--libm/e_j1.c8
-rw-r--r--libm/e_jn.c8
-rw-r--r--libm/e_lgamma.c4
-rw-r--r--libm/e_lgamma_r.c4
-rw-r--r--libm/e_log.c4
-rw-r--r--libm/e_log10.c4
-rw-r--r--libm/e_pow.c4
-rw-r--r--libm/e_rem_pio2.c4
-rw-r--r--libm/e_remainder.c4
-rw-r--r--libm/e_scalb.c8
-rw-r--r--libm/e_sinh.c4
-rw-r--r--libm/e_sqrt.c4
-rw-r--r--libm/float_wrappers.c14
-rw-r--r--libm/k_cos.c4
-rw-r--r--libm/k_rem_pio2.c4
-rw-r--r--libm/k_sin.c4
-rw-r--r--libm/k_tan.c4
-rw-r--r--libnsl/Makefile61
-rw-r--r--libnsl/Makefile.in14
-rw-r--r--libnsl/nsl.c25
-rw-r--r--libresolv/Makefile66
-rw-r--r--libresolv/Makefile.in14
-rw-r--r--librt/Makefile63
-rw-r--r--librt/Makefile.in14
-rw-r--r--librt/kernel-posix-cpu-timers.h18
-rw-r--r--librt/kernel-posix-timers.h72
-rw-r--r--libutil/Makefile75
-rw-r--r--libutil/Makefile.in14
-rw-r--r--libutil/forkpty.c65
-rw-r--r--libutil/login_tty.c4
-rw-r--r--libutil/logout.c30
-rw-r--r--libutil/logwtmp.c44
-rw-r--r--libutil/openpty.c26
56 files changed, 339 insertions, 757 deletions
diff --git a/libc/sysdeps/linux/common/getegid.c b/libc/sysdeps/linux/common/getegid.c
index ad07f6462..bed60f052 100644
--- a/libc/sysdeps/linux/common/getegid.c
+++ b/libc/sysdeps/linux/common/getegid.c
@@ -7,19 +7,22 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+#define getgid __getgid
+
#include "syscalls.h"
#include <unistd.h>
#ifdef __NR_getegid
#define __NR___syscall_getegid __NR_getegid
static inline _syscall0(int, __syscall_getegid);
-gid_t getegid(void)
+gid_t attribute_hidden __getegid(void)
{
return (__syscall_getegid());
}
#else
-gid_t getegid(void)
+gid_t attribute_hidden __getegid(void)
{
return (getgid());
}
#endif
+strong_alias(__getegid,getegid)
diff --git a/libc/sysdeps/linux/common/getgid.c b/libc/sysdeps/linux/common/getgid.c
index 3d8b43e74..eba29afa2 100644
--- a/libc/sysdeps/linux/common/getgid.c
+++ b/libc/sysdeps/linux/common/getgid.c
@@ -16,7 +16,8 @@
#endif
static inline _syscall0(int, __syscall_getgid);
-gid_t getgid(void)
+gid_t attribute_hidden __getgid(void)
{
return (__syscall_getgid());
}
+strong_alias(__getgid,getgid)
diff --git a/libcrypt/Makefile b/libcrypt/Makefile
index 2b129a8e2..c8dc9b466 100644
--- a/libcrypt/Makefile
+++ b/libcrypt/Makefile
@@ -1,63 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-LIB_NAME=libcrypt
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CSRC = $(wildcard *.c)
-
-OBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libcrypt/Makefile.in b/libcrypt/Makefile.in
index 9aa0d014e..7c8b4589f 100644
--- a/libcrypt/Makefile.in
+++ b/libcrypt/Makefile.in
@@ -20,7 +20,11 @@ libcrypt_OUT := $(top_builddir)libcrypt
libcrypt_SRC := $(wildcard $(libcrypt_DIR)/*.c)
libcrypt_OBJ := $(patsubst $(libcrypt_DIR)/%.c,$(libcrypt_OUT)/%.o,$(libcrypt_SRC))
+ifeq ($(DOPIC),y)
+libcrypt-a-y := $(libcrypt_OBJ:.o=.os)
+else
libcrypt-a-y := $(libcrypt_OBJ)
+endif
libcrypt-so-y := $(libcrypt_OBJ:.o=.os)
libcrypt-multi-y := $(libcrypt_SRC)
@@ -29,7 +33,11 @@ lib-a-y += $(top_builddir)lib/libcrypt.a
lib-so-y += $(top_builddir)lib/libcrypt.so
objclean-y += libcrypt_clean
-$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libcrypt.so: $(top_builddir)lib/libcrypt.a $(libc)
+else
+$(top_builddir)lib/libcrypt.so: $(libcrypt_OUT)/libcrypt_so.a $(libc)
+endif
$(call link.so,$(libcrypt_FULL_NAME),$(MAJOR_VERSION))
$(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
@@ -37,11 +45,7 @@ $(libcrypt_OUT)/libcrypt_so.a: $(libcrypt-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y:.o=.os)
-else
$(top_builddir)lib/libcrypt.a: $(libcrypt-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libcrypt/crypt.c b/libcrypt/crypt.c
index 57181dc61..a7dd35458 100644
--- a/libcrypt/crypt.c
+++ b/libcrypt/crypt.c
@@ -6,19 +6,20 @@
* Copyright (C) 2000,2001 by Erik Andersen <andersen@uclibc.org>
* Written by Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- * for more details.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#define __FORCE_GLIBC
@@ -37,4 +38,3 @@ extern char * crypt(const char *key, const char *salt)
else
return __des_crypt(key, salt);
}
-
diff --git a/libcrypt/des.c b/libcrypt/des.c
index 3b49a7af6..5966da0b9 100644
--- a/libcrypt/des.c
+++ b/libcrypt/des.c
@@ -638,7 +638,7 @@ encrypt(char *block, int flag)
block[(i << 5) | j] = (io[i] & bits32[j]) ? 1 : 0;
}
-char *
+char attribute_hidden *
__des_crypt(const char *key, const char *setting)
{
u_int32_t count, salt, l, r0, r1, keybuf[2];
diff --git a/libcrypt/md5.c b/libcrypt/md5.c
index 27ee2a802..7d852b7b2 100644
--- a/libcrypt/md5.c
+++ b/libcrypt/md5.c
@@ -531,7 +531,7 @@ static void __md5_to64( char *s, unsigned long v, int n)
* Use MD5 for what it is best at...
*/
-extern char * __md5_crypt( const char *pw, const char *salt)
+extern char attribute_hidden * __md5_crypt( const char *pw, const char *salt)
{
/* Static stuff */
static const char *sp, *ep;
diff --git a/libintl/Makefile b/libintl/Makefile
index 86a6b8deb..c8dc9b466 100644
--- a/libintl/Makefile
+++ b/libintl/Makefile
@@ -1,66 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-LIB_NAME=libintl
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-MSRC= intl.c
-MOBJ= gettext.o ngettext.o dgettext.o dcgettext.o dngettext.o dcngettext.o \
- textdomain.o bindtextdomain.o bind_textdomain_codeset.o \
- _nl_expand_alias.o _nl_msg_cat_cntr.o # glibc-isms
-
-OBJS=$(MOBJ)
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(MOBJ): $(MSRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libintl/Makefile.in b/libintl/Makefile.in
index 3fa075994..0afd0504b 100644
--- a/libintl/Makefile.in
+++ b/libintl/Makefile.in
@@ -27,7 +27,11 @@ libintl_MOBJ := $(patsubst %.o,$(libintl_OUT)/%.o,$(MOBJ))
libintl_DEF := $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libintl_MOBJ))))
+ifeq ($(DOPIC),y)
+libintl-a-y := $(libintl_MOBJ:.o=.os)
+else
libintl-a-y := $(libintl_MOBJ)
+endif
libintl-so-y := $(libintl_MOBJ:.o=.os)
CFLAGS-multi-y := $(libintl_DEF)
@@ -37,7 +41,11 @@ lib-a-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(top_builddir)lib/libintl.a
lib-so-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(top_builddir)lib/libintl.so
objclean-y += libintl_clean
-$(top_builddir)lib/libintl.so: $(libintl_OUT)/libintl_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libintl.so: $(top_builddir)lib/libintl.a $(libc)
+else
+$(top_builddir)lib/libintl.so: $(libintl_OUT)/libintl_so.a $(libc)
+endif
$(call link.so,$(libintl_FULL_NAME),$(MAJOR_VERSION))
$(libintl_OUT)/libintl_so.a: $(libintl-so-y)
@@ -45,11 +53,7 @@ $(libintl_OUT)/libintl_so.a: $(libintl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libintl.a: $(libintl-a-y:.o=.os)
-else
$(top_builddir)lib/libintl.a: $(libintl-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libm/Makefile b/libm/Makefile
index dc65064f8..c8dc9b466 100644
--- a/libm/Makefile
+++ b/libm/Makefile
@@ -1,129 +1,13 @@
-# Makefile for uClibc's math library
+# Makefile for uClibc
#
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# The routines included in this math library are derived from the
-# math library for Apple's MacOS X/Darwin math library, which was
-# itself swiped from FreeBSD. The original copyright information
-# is as follows:
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-#
-# Developed at SunPro, a Sun Microsystems, Inc. business.
-# Permission to use, copy, modify, and distribute this
-# software is freely granted, provided that this notice
-# is preserved.
-#
-# It has been ported to work with uClibc and generally behave
-# by Erik Andersen <andersen@codepoet.org>
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-CFLAGS+=-D_IEEE_LIBM -D_ISOC99_SOURCE -D_SVID_SOURCE
-
-LIB_NAME=libm
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-FL_MSRC = float_wrappers.c
-
-ifeq ($(strip $(DO_C99_MATH)),y)
-CSRC = e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c\
- e_exp.c e_fmod.c e_gamma.c e_gamma_r.c e_hypot.c e_j0.c\
- e_j1.c e_jn.c e_lgamma.c e_lgamma_r.c e_log.c e_log10.c\
- e_pow.c e_remainder.c e_rem_pio2.c e_scalb.c e_sinh.c\
- e_sqrt.c k_cos.c k_rem_pio2.c k_sin.c k_standard.c k_tan.c\
- s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c\
- s_erf.c s_expm1.c s_fabs.c s_finite.c s_floor.c s_frexp.c\
- s_ilogb.c s_ldexp.c s_lib_version.c s_log1p.c s_logb.c\
- s_matherr.c s_modf.c s_nextafter.c s_rint.c s_scalbn.c\
- s_signgam.c s_significand.c s_sin.c s_tan.c s_tanh.c\
- w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cabs.c\
- w_cosh.c w_drem.c w_exp.c w_fmod.c w_gamma.c w_gamma_r.c\
- w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c w_lgamma_r.c\
- w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c\
- w_sqrt.c fpmacros.c nan.c s_lround.c s_llround.c s_round.c
-FL_MOBJ = acosf.o acoshf.o asinf.o asinhf.o atan2f.o atanf.o atanhf.o cbrtf.o \
- ceilf.o copysignf.o cosf.o coshf.o erfcf.o erff.o exp2f.o expf.o \
- expm1f.o fabsf.o fdimf.o floorf.o fmaf.o fmaxf.o fminf.o fmodf.o \
- frexpf.o hypotf.o ilogbf.o ldexpf.o lgammaf.o log10f.o log1pf.o \
- log2f.o logbf.o logf.o lrintf.o lroundf.o modff.o nearbyintf.o \
- nextafterf.o powf.o remainderf.o remquof.o rintf.o roundf.o \
- scalblnf.o scalbnf.o sinf.o sinhf.o sqrtf.o tanf.o tanhf.o \
- tgammaf.o truncf.o
-else
-# This list of math functions was taken from POSIX/IEEE 1003.1b-1993
-CSRC = w_acos.c w_asin.c s_atan.c w_atan2.c s_ceil.c s_cos.c \
- w_cosh.c w_exp.c s_fabs.c s_floor.c w_fmod.c s_frexp.c \
- s_ldexp.c w_log.c w_log10.c s_modf.c w_pow.c s_sin.c \
- w_sinh.c w_sqrt.c s_tan.c s_tanh.c
-CSRC+= s_expm1.c s_scalbn.c s_copysign.c e_acos.c e_asin.c e_atan2.c \
- k_cos.c e_cosh.c e_exp.c e_fmod.c e_log.c e_log10.c e_pow.c \
- k_sin.c e_sinh.c e_sqrt.c k_tan.c e_rem_pio2.c k_rem_pio2.c \
- s_finite.c
-# We'll add sqrtf to avoid problems with libstdc++
-FL_MOBJ = sqrtf.o
-endif
-
-ifeq ($(strip $(HAS_FPU)),y)
-ifeq ($(strip $(DO_C99_MATH)),y)
-ARCH_CSRC=$(wildcard $(TARGET_ARCH)/*.c)
-ARCH_OBJS=$(patsubst %.c,%.o, $(ARCH_CSRC))
-endif
-endif
-
-COBJS=$(patsubst %.c,%.o, $(CSRC))
-OBJS=$(COBJS) $(FL_MOBJ)
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS) $(ARCH_OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(ARCH_OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(COBJS) $(ARCH_OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-$(FL_MOBJ): $(FL_MSRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-
-tags:
- ctags -R
-clean:
- $(RM) *.o */*.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libm/Makefile.in b/libm/Makefile.in
index 4a021fccf..19211f5ff 100644
--- a/libm/Makefile.in
+++ b/libm/Makefile.in
@@ -117,7 +117,11 @@ libm_DEF := $(patsubst %,-DL_%,$(subst .o,,$(notdir $(libm_MOBJ))))
libm_OBJS := $(libm_OBJ) $(libm_MOBJ)
+ifeq ($(DOPIC),y)
+libm-a-y += $(libm_OBJS:.o=.os)
+else
libm-a-y += $(libm_OBJS)
+endif
libm-so-y += $(libm_OBJS:.o=.os)
CFLAGS-multi-y := $(libm_DEF)
@@ -128,7 +132,11 @@ lib-a-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.a
lib-so-$(UCLIBC_HAS_FLOATS) += $(top_builddir)lib/libm.so
objclean-y += libm_clean
-$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libm.so: $(top_builddir)lib/libm.a $(libc)
+else
+$(top_builddir)lib/libm.so: $(libm_OUT)/libm_so.a $(libc)
+endif
$(call link.so,$(libm_FULL_NAME),$(MAJOR_VERSION))
$(libm_OUT)/libm_so.a: $(libm-so-y)
@@ -136,11 +144,7 @@ $(libm_OUT)/libm_so.a: $(libm-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libm.a: $(libm-a-y:.o=.os)
-else
$(top_builddir)lib/libm.a: $(libm-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libm/e_acos.c b/libm/e_acos.c
index 9f6305e1e..265619325 100644
--- a/libm/e_acos.c
+++ b/libm/e_acos.c
@@ -62,9 +62,9 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
#ifdef __STDC__
- double __ieee754_acos(double x)
+ double attribute_hidden __ieee754_acos(double x)
#else
- double __ieee754_acos(x)
+ double attribute_hidden __ieee754_acos(x)
double x;
#endif
{
diff --git a/libm/e_acosh.c b/libm/e_acosh.c
index 3b3c6251e..258ffa549 100644
--- a/libm/e_acosh.c
+++ b/libm/e_acosh.c
@@ -40,9 +40,9 @@ one = 1.0,
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
#ifdef __STDC__
- double __ieee754_acosh(double x)
+ double attribute_hidden __ieee754_acosh(double x)
#else
- double __ieee754_acosh(x)
+ double attribute_hidden __ieee754_acosh(x)
double x;
#endif
{
diff --git a/libm/e_asin.c b/libm/e_asin.c
index d7a785350..f9b16da71 100644
--- a/libm/e_asin.c
+++ b/libm/e_asin.c
@@ -71,9 +71,9 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
#ifdef __STDC__
- double __ieee754_asin(double x)
+ double attribute_hidden __ieee754_asin(double x)
#else
- double __ieee754_asin(x)
+ double attribute_hidden __ieee754_asin(x)
double x;
#endif
{
diff --git a/libm/e_atan2.c b/libm/e_atan2.c
index 8bfc79232..594b9a16f 100644
--- a/libm/e_atan2.c
+++ b/libm/e_atan2.c
@@ -57,9 +57,9 @@ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
#ifdef __STDC__
- double __ieee754_atan2(double y, double x)
+ double attribute_hidden __ieee754_atan2(double y, double x)
#else
- double __ieee754_atan2(y,x)
+ double attribute_hidden __ieee754_atan2(y,x)
double y,x;
#endif
{
diff --git a/libm/e_atanh.c b/libm/e_atanh.c
index d199a05cc..7c8bbc14f 100644
--- a/libm/e_atanh.c
+++ b/libm/e_atanh.c
@@ -48,9 +48,9 @@ static double zero = 0.0;
#endif
#ifdef __STDC__
- double __ieee754_atanh(double x)
+ double attribute_hidden __ieee754_atanh(double x)
#else
- double __ieee754_atanh(x)
+ double attribute_hidden __ieee754_atanh(x)
double x;
#endif
{
diff --git a/libm/e_cosh.c b/libm/e_cosh.c
index 88499684a..5558a9642 100644
--- a/libm/e_cosh.c
+++ b/libm/e_cosh.c
@@ -45,9 +45,9 @@ static double one = 1.0, half=0.5, huge = 1.0e300;
#endif
#ifdef __STDC__
- double __ieee754_cosh(double x)
+ double attribute_hidden __ieee754_cosh(double x)
#else
- double __ieee754_cosh(x)
+ double attribute_hidden __ieee754_cosh(x)
double x;
#endif
{
diff --git a/libm/e_exp.c b/libm/e_exp.c
index f4d832bbb..f9c5371d9 100644
--- a/libm/e_exp.c
+++ b/libm/e_exp.c
@@ -104,9 +104,9 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
#ifdef __STDC__
- double __ieee754_exp(double x) /* default IEEE double exp */
+ double attribute_hidden __ieee754_exp(double x) /* default IEEE double exp */
#else
- double __ieee754_exp(x) /* default IEEE double exp */
+ double attribute_hidden __ieee754_exp(x) /* default IEEE double exp */
double x;
#endif
{
diff --git a/libm/e_fmod.c b/libm/e_fmod.c
index 565c3772b..1e8487cf0 100644
--- a/libm/e_fmod.c
+++ b/libm/e_fmod.c
@@ -30,9 +30,9 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
#endif
#ifdef __STDC__
- double __ieee754_fmod(double x, double y)
+ double attribute_hidden __ieee754_fmod(double x, double y)
#else
- double __ieee754_fmod(x,y)
+ double attribute_hidden __ieee754_fmod(x,y)
double x,y ;
#endif
{
diff --git a/libm/e_gamma.c b/libm/e_gamma.c
index a82261370..23611c369 100644
--- a/libm/e_gamma.c
+++ b/libm/e_gamma.c
@@ -24,9 +24,9 @@ extern int signgam;
#ifdef __STDC__
//__private_extern__
- double __ieee754_gamma(double x)
+ double attribute_hidden __ieee754_gamma(double x)
#else
- double __ieee754_gamma(x)
+ double attribute_hidden __ieee754_gamma(x)
double x;
#endif
{
diff --git a/libm/e_gamma_r.c b/libm/e_gamma_r.c
index 039eba49b..36b0d45d6 100644
--- a/libm/e_gamma_r.c
+++ b/libm/e_gamma_r.c
@@ -23,9 +23,9 @@
#ifdef __STDC__
//__private_extern__
- double __ieee754_gamma_r(double x, int *signgamp)
+ double attribute_hidden __ieee754_gamma_r(double x, int *signgamp)
#else
- double __ieee754_gamma_r(x,signgamp)
+ double attribute_hidden __ieee754_gamma_r(x,signgamp)
double x; int *signgamp;
#endif
{
diff --git a/libm/e_hypot.c b/libm/e_hypot.c
index 2052e215b..62acc8d03 100644
--- a/libm/e_hypot.c
+++ b/libm/e_hypot.c
@@ -50,9 +50,9 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
#include "math_private.h"
#ifdef __STDC__
- double __ieee754_hypot(double x, double y)
+ double attribute_hidden __ieee754_hypot(double x, double y)
#else
- double __ieee754_hypot(x,y)
+ double attribute_hidden __ieee754_hypot(x,y)
double x, y;
#endif
{
diff --git a/libm/e_j0.c b/libm/e_j0.c
index b347481ec..eaf06be05 100644
--- a/libm/e_j0.c
+++ b/libm/e_j0.c
@@ -94,9 +94,9 @@ static double zero = 0.0;
#endif
#ifdef __STDC__
- double __ieee754_j0(double x)
+ double attribute_hidden __ieee754_j0(double x)
#else
- double __ieee754_j0(x)
+ double attribute_hidden __ieee754_j0(x)
double x;
#endif
{
@@ -163,9 +163,9 @@ v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
#ifdef __STDC__
- double __ieee754_y0(double x)
+ double attribute_hidden __ieee754_y0(double x)
#else
- double __ieee754_y0(x)
+ double attribute_hidden __ieee754_y0(x)
double x;
#endif
{
diff --git a/libm/e_j1.c b/libm/e_j1.c
index e57049e84..370f0f0a1 100644
--- a/libm/e_j1.c
+++ b/libm/e_j1.c
@@ -95,9 +95,9 @@ static double zero = 0.0;
#endif
#ifdef __STDC__
- double __ieee754_j1(double x)
+ double attribute_hidden __ieee754_j1(double x)
#else
- double __ieee754_j1(x)
+ double attribute_hidden __ieee754_j1(x)
double x;
#endif
{
@@ -164,9 +164,9 @@ static double V0[5] = {
};
#ifdef __STDC__
- double __ieee754_y1(double x)
+ double attribute_hidden __ieee754_y1(double x)
#else
- double __ieee754_y1(x)
+ double attribute_hidden __ieee754_y1(x)
double x;
#endif
{
diff --git a/libm/e_jn.c b/libm/e_jn.c
index 857c4a3f5..ac0013b8d 100644
--- a/libm/e_jn.c
+++ b/libm/e_jn.c
@@ -59,9 +59,9 @@ static double zero = 0.00000000000000000000e+00;
#endif
#ifdef __STDC__
- double __ieee754_jn(int n, double x)
+ double attribute_hidden __ieee754_jn(int n, double x)
#else
- double __ieee754_jn(n,x)
+ double attribute_hidden __ieee754_jn(n,x)
int n; double x;
#endif
{
@@ -219,9 +219,9 @@ static double zero = 0.00000000000000000000e+00;
}
#ifdef __STDC__
- double __ieee754_yn(int n, double x)
+ double attribute_hidden __ieee754_yn(int n, double x)
#else
- double __ieee754_yn(n,x)
+ double attribute_hidden __ieee754_yn(n,x)
int n; double x;
#endif
{
diff --git a/libm/e_lgamma.c b/libm/e_lgamma.c
index f5f24ce64..3d3d6471d 100644
--- a/libm/e_lgamma.c
+++ b/libm/e_lgamma.c
@@ -24,9 +24,9 @@ extern int signgam;
#ifdef __STDC__
//__private_extern__
- double __ieee754_lgamma(double x)
+ double attribute_hidden __ieee754_lgamma(double x)
#else
- double __ieee754_lgamma(x)
+ double attribute_hidden __ieee754_lgamma(x)
double x;
#endif
{
diff --git a/libm/e_lgamma_r.c b/libm/e_lgamma_r.c
index 09bae2af3..42b48b3a6 100644
--- a/libm/e_lgamma_r.c
+++ b/libm/e_lgamma_r.c
@@ -217,9 +217,9 @@ __inline__
#ifdef __STDC__
- double __ieee754_lgamma_r(double x, int *signgamp)
+ double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp)
#else
- double __ieee754_lgamma_r(x,signgamp)
+ double attribute_hidden __ieee754_lgamma_r(x,signgamp)
double x; int *signgamp;
#endif
{
diff --git a/libm/e_log.c b/libm/e_log.c
index 0464014cb..fce0617aa 100644
--- a/libm/e_log.c
+++ b/libm/e_log.c
@@ -91,9 +91,9 @@ static double zero = 0.0;
#endif
#ifdef __STDC__
- double __ieee754_log(double x)
+ double attribute_hidden __ieee754_log(double x)
#else
- double __ieee754_log(x)
+ double attribute_hidden __ieee754_log(x)
double x;
#endif
{
diff --git a/libm/e_log10.c b/libm/e_log10.c
index 2716a72c1..5b25c0f76 100644
--- a/libm/e_log10.c
+++ b/libm/e_log10.c
@@ -67,9 +67,9 @@ static double zero = 0.0;
#endif
#ifdef __STDC__
- double __ieee754_log10(double x)
+ double attribute_hidden __ieee754_log10(double x)
#else
- double __ieee754_log10(x)
+ double attribute_hidden __ieee754_log10(x)
double x;
#endif
{
diff --git a/libm/e_pow.c b/libm/e_pow.c
index b970775cd..94b490115 100644
--- a/libm/e_pow.c
+++ b/libm/e_pow.c
@@ -100,9 +100,9 @@ ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
#ifdef __STDC__
- double __ieee754_pow(double x, double y)
+ double attribute_hidden __ieee754_pow(double x, double y)
#else
- double __ieee754_pow(x,y)
+ double attribute_hidden __ieee754_pow(x,y)
double x, y;
#endif
{
diff --git a/libm/e_rem_pio2.c b/libm/e_rem_pio2.c
index 3dd7f7b49..239b68a73 100644
--- a/libm/e_rem_pio2.c
+++ b/libm/e_rem_pio2.c
@@ -84,9 +84,9 @@ pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
#ifdef __STDC__
- int32_t __ieee754_rem_pio2(double x, double *y)
+ int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y)
#else
- int32_t __ieee754_rem_pio2(x,y)
+ int32_t attribute_hidden __ieee754_rem_pio2(x,y)
double x,y[];
#endif
{
diff --git a/libm/e_remainder.c b/libm/e_remainder.c
index 52e8a28d3..1f7ea126b 100644
--- a/libm/e_remainder.c
+++ b/libm/e_remainder.c
@@ -34,9 +34,9 @@ static double zero = 0.0;
#ifdef __STDC__
- double __ieee754_remainder(double x, double p)
+ double attribute_hidden __ieee754_remainder(double x, double p)
#else
- double __ieee754_remainder(x,p)
+ double attribute_hidden __ieee754_remainder(x,p)
double x,p;
#endif
{
diff --git a/libm/e_scalb.c b/libm/e_scalb.c
index 9a366f330..1a1c43ac7 100644
--- a/libm/e_scalb.c
+++ b/libm/e_scalb.c
@@ -25,16 +25,16 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $";
#ifdef _SCALB_INT
#ifdef __STDC__
- double __ieee754_scalb(double x, int fn)
+ double attribute_hidden __ieee754_scalb(double x, int fn)
#else
- double __ieee754_scalb(x,fn)
+ double attribute_hidden __ieee754_scalb(x,fn)
double x; int fn;
#endif
#else
#ifdef __STDC__
- double __ieee754_scalb(double x, double fn)
+ double attribute_hidden __ieee754_scalb(double x, double fn)
#else
- double __ieee754_scalb(x,fn)
+ double attribute_hidden __ieee754_scalb(x,fn)
double x, fn;
#endif
#endif
diff --git a/libm/e_sinh.c b/libm/e_sinh.c
index c63ff8ade..462bc2f57 100644
--- a/libm/e_sinh.c
+++ b/libm/e_sinh.c
@@ -42,9 +42,9 @@ static double one = 1.0, shuge = 1.0e307;
#endif
#ifdef __STDC__
- double __ieee754_sinh(double x)
+ double attribute_hidden __ieee754_sinh(double x)
#else
- double __ieee754_sinh(x)
+ double attribute_hidden __ieee754_sinh(x)
double x;
#endif
{
diff --git a/libm/e_sqrt.c b/libm/e_sqrt.c
index fae52c842..c8385d673 100644
--- a/libm/e_sqrt.c
+++ b/libm/e_sqrt.c
@@ -94,9 +94,9 @@ static double one = 1.0, tiny=1.0e-300;
#endif
#ifdef __STDC__
- double __ieee754_sqrt(double x)
+ double attribute_hidden __ieee754_sqrt(double x)
#else
- double __ieee754_sqrt(x)
+ double attribute_hidden __ieee754_sqrt(x)
double x;
#endif
{
diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c
index 4ea924201..0be5304f7 100644
--- a/libm/float_wrappers.c
+++ b/libm/float_wrappers.c
@@ -7,19 +7,7 @@
*
* Copyright (C) 2005 by Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * GNU Lesser General Public License version 2.1 or later.
*/
#include "math.h"
diff --git a/libm/k_cos.c b/libm/k_cos.c
index 03c208aac..b2bbca0ca 100644
--- a/libm/k_cos.c
+++ b/libm/k_cos.c
@@ -66,9 +66,9 @@ C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
#ifdef __STDC__
- double __kernel_cos(double x, double y)
+ double attribute_hidden __kernel_cos(double x, double y)
#else
- double __kernel_cos(x, y)
+ double attribute_hidden __kernel_cos(x, y)
double x,y;
#endif
{
diff --git a/libm/k_rem_pio2.c b/libm/k_rem_pio2.c
index 9113d8762..e0347aad1 100644
--- a/libm/k_rem_pio2.c
+++ b/libm/k_rem_pio2.c
@@ -165,9 +165,9 @@ two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
#ifdef __STDC__
- int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
+ int attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
#else
- int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
+ int attribute_hidden __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
double x[], y[]; int e0,nx,prec; int32_t ipio2[];
#endif
{
diff --git a/libm/k_sin.c b/libm/k_sin.c
index 5bfc1d680..153f37ece 100644
--- a/libm/k_sin.c
+++ b/libm/k_sin.c
@@ -59,9 +59,9 @@ S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
#ifdef __STDC__
- double __kernel_sin(double x, double y, int iy)
+ double attribute_hidden __kernel_sin(double x, double y, int iy)
#else
- double __kernel_sin(x, y, iy)
+ double attribute_hidden __kernel_sin(x, y, iy)
double x,y; int iy; /* iy=0 if y is zero */
#endif
{
diff --git a/libm/k_tan.c b/libm/k_tan.c
index 8f7822a3d..5698db569 100644
--- a/libm/k_tan.c
+++ b/libm/k_tan.c
@@ -75,9 +75,9 @@ T[] = {
};
#ifdef __STDC__
- double __kernel_tan(double x, double y, int iy)
+ double attribute_hidden __kernel_tan(double x, double y, int iy)
#else
- double __kernel_tan(x, y, iy)
+ double attribute_hidden __kernel_tan(x, y, iy)
double x,y; int iy;
#endif
{
diff --git a/libnsl/Makefile b/libnsl/Makefile
index d20fe2113..c8dc9b466 100644
--- a/libnsl/Makefile
+++ b/libnsl/Makefile
@@ -1,58 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-LIB_NAME=libnsl
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CSRC = $(wildcard *.c)
-
-OBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libnsl/Makefile.in b/libnsl/Makefile.in
index f3221f481..1c354176c 100644
--- a/libnsl/Makefile.in
+++ b/libnsl/Makefile.in
@@ -19,7 +19,11 @@ libnsl_OUT := $(top_builddir)libnsl
libnsl_SRC := $(libnsl_DIR)/nsl.c
libnsl_OBJ := $(patsubst $(libnsl_DIR)/%.c,$(libnsl_OUT)/%.o,$(libnsl_SRC))
+ifeq ($(DOPIC),y)
+libnsl-a-y := $(libnsl_OBJ:.o=.os)
+else
libnsl-a-y := $(libnsl_OBJ)
+endif
libnsl-so-y := $(libnsl_OBJ:.o=.os)
libnsl-multi-y := $(libnsl_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/libnsl.a
lib-so-y += $(top_builddir)lib/libnsl.so
objclean-y += libnsl_clean
-$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libnsl.so: $(top_builddir)lib/libnsl.a $(libc)
+else
+$(top_builddir)lib/libnsl.so: $(libnsl_OUT)/libnsl_so.a $(libc)
+endif
$(call link.so,$(libnsl_FULL_NAME),$(MAJOR_VERSION))
$(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
@@ -36,11 +44,7 @@ $(libnsl_OUT)/libnsl_so.a: $(libnsl-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libnsl.a: $(libnsl-a-y:.o=.os)
-else
$(top_builddir)lib/libnsl.a: $(libnsl-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libnsl/nsl.c b/libnsl/nsl.c
index 318d28d8a..589b2960e 100644
--- a/libnsl/nsl.c
+++ b/libnsl/nsl.c
@@ -4,20 +4,20 @@
*
* Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#include <features.h>
@@ -27,4 +27,3 @@ void __stub2(void)
return;
}
link_warning (__stub2, "the `libnsl' library is a stub. Do you really need it?")
-
diff --git a/libresolv/Makefile b/libresolv/Makefile
index e32f1dd8c..c8dc9b466 100644
--- a/libresolv/Makefile
+++ b/libresolv/Makefile
@@ -1,63 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-LIB_NAME=libresolv
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CSRC = $(wildcard *.c)
-
-OBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libresolv/Makefile.in b/libresolv/Makefile.in
index f7a474ad4..acf59ea20 100644
--- a/libresolv/Makefile.in
+++ b/libresolv/Makefile.in
@@ -19,7 +19,11 @@ libresolv_OUT := $(top_builddir)libresolv
libresolv_SRC := $(libresolv_DIR)/resolv.c
libresolv_OBJ := $(patsubst $(libresolv_DIR)/%.c,$(libresolv_OUT)/%.o,$(libresolv_SRC))
+ifeq ($(DOPIC),y)
+libresolv-a-y := $(libresolv_OBJ:.o=.os)
+else
libresolv-a-y := $(libresolv_OBJ)
+endif
libresolv-so-y := $(libresolv_OBJ:.o=.os)
libresolv-multi-y := $(libresolv_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/libresolv.a
lib-so-y += $(top_builddir)lib/libresolv.so
objclean-y += libresolv_clean
-$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libresolv.so: $(top_builddir)lib/libresolv.a $(libc)
+else
+$(top_builddir)lib/libresolv.so: $(libresolv_OUT)/libresolv_so.a $(libc)
+endif
$(call link.so,$(libresolv_FULL_NAME),$(MAJOR_VERSION))
$(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
@@ -36,11 +44,7 @@ $(libresolv_OUT)/libresolv_so.a: $(libresolv-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libresolv.a: $(libresolv-a-y:.o=.os)
-else
$(top_builddir)lib/libresolv.a: $(libresolv-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/librt/Makefile b/librt/Makefile
index b17e58057..c8dc9b466 100644
--- a/librt/Makefile
+++ b/librt/Makefile
@@ -1,60 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS+=$(SSP_ALL_CFLAGS)
-
-LIB_NAME=librt
-AR_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-# uClibc's librt lacks all aio routines, all clock routines,
-# and all shm routines
-CSRC=$(wildcard *.c)
-
-OBJS=$(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(strip $(HAVE_SHARED)),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $(AR_LIB_NAME)
- $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(OBJS)
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $(SO_LIB_NAME)
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $(AR_LIB_NAME) \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME)
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- $(STRIPTOOL) -x -R .note -R .comment $*.o
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/librt/Makefile.in b/librt/Makefile.in
index 20a22e26d..ec405e556 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -19,7 +19,11 @@ librt_OUT := $(top_builddir)librt
librt_SRC := $(wildcard $(librt_DIR)/*.c)
librt_OBJ := $(patsubst $(librt_DIR)/%.c,$(librt_OUT)/%.o,$(librt_SRC))
+ifeq ($(DOPIC),y)
+librt-a-y := $(librt_OBJ:.o=.os)
+else
librt-a-y := $(librt_OBJ)
+endif
librt-so-y := $(librt_OBJ:.o=.os)
librt-multi-y += $(librt_SRC)
@@ -28,7 +32,11 @@ lib-a-y += $(top_builddir)lib/librt.a
lib-so-y += $(top_builddir)lib/librt.so
objclean-y += librt_clean
-$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc)
+else
+$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc)
+endif
$(call link.so,$(librt_FULL_NAME),$(MAJOR_VERSION))
$(librt_OUT)/librt_so.a: $(librt-so-y)
@@ -36,11 +44,7 @@ $(librt_OUT)/librt_so.a: $(librt-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/librt.a: $(librt-a-y:.o=.os)
-else
$(top_builddir)lib/librt.a: $(librt-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/librt/kernel-posix-cpu-timers.h b/librt/kernel-posix-cpu-timers.h
deleted file mode 100644
index 164a90dde..000000000
--- a/librt/kernel-posix-cpu-timers.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Parameters for the Linux kernel ABI for CPU clocks. */
-
-#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3))
-#define CPUCLOCK_PERTHREAD(clock) \
- (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)
-#define CPUCLOCK_PID_MASK 7
-#define CPUCLOCK_PERTHREAD_MASK 4
-#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
-#define CPUCLOCK_CLOCK_MASK 3
-#define CPUCLOCK_PROF 0
-#define CPUCLOCK_VIRT 1
-#define CPUCLOCK_SCHED 2
-#define CPUCLOCK_MAX 3
-
-#define MAKE_PROCESS_CPUCLOCK(pid, clock) \
- ((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
-#define MAKE_THREAD_CPUCLOCK(tid, clock) \
- MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)
diff --git a/librt/kernel-posix-timers.h b/librt/kernel-posix-timers.h
index d8d2ba2c0..bf246c925 100644
--- a/librt/kernel-posix-timers.h
+++ b/librt/kernel-posix-timers.h
@@ -1,66 +1,36 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+/*
+ * kernel-posix-timers.h - kernel-dependent definitions for POSIX timers.
+ */
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef __UCLIBC_HAS_THREADS__
-#include <pthread.h>
-#endif
+#include <features.h>
#include <setjmp.h>
#include <signal.h>
#include <sys/types.h>
-
-
-/* Nonzero if the system calls are not available. */
-extern int __no_posix_timers attribute_hidden;
-
-/* Callback to start helper thread. */
-extern void __start_helper_thread (void) attribute_hidden;
-
#ifdef __UCLIBC_HAS_THREADS__
-/* Control variable for helper thread creation. */
-extern pthread_once_t __helper_once attribute_hidden;
+#include <pthread.h>
#endif
-/* TID of the helper thread. */
-extern pid_t __helper_tid attribute_hidden;
-
-
-/* Type of timers in the kernel. */
+/* Type of timers in the kernel */
typedef int kernel_timer_t;
+/* Internal representation of timer */
+struct timer {
+ /* Notification mechanism */
+ int sigev_notify;
-/* Internal representation of timer. */
-struct timer
-{
- /* Notification mechanism. */
- int sigev_notify;
-
- /* Timer ID returned by the kernel. */
- kernel_timer_t ktimerid;
+ /* Timer ID returned by the kernel */
+ kernel_timer_t ktimerid;
- /* All new elements must be added after ktimerid. And if the thrfunc
- element is not the third element anymore the memory allocation in
- timer_create needs to be changed. */
+ /*
+ * All new elements must be added after ktimerid. And if the thrfunc
+ * element is not the third element anymore the memory allocation in
+ * timer_create needs to be changed.
+ */
- /* Parameters for the thread to be started for SIGEV_THREAD. */
- void (*thrfunc) (sigval_t);
- sigval_t sival;
+ /* Parameters for the thread to be started for SIGEV_THREAD */
+ void (*thrfunc) (sigval_t);
+ sigval_t sival;
#ifdef __UCLIBC_HAS_THREADS__
- pthread_attr_t attr;
+ pthread_attr_t attr;
#endif
};
diff --git a/libutil/Makefile b/libutil/Makefile
index 97b9d3913..c8dc9b466 100644
--- a/libutil/Makefile
+++ b/libutil/Makefile
@@ -1,72 +1,13 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
-# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
-
-TOPDIR=../
-include $(TOPDIR)Rules.mak
-
-CFLAGS += $(SSP_ALL_CFLAGS)
-
-LIB_NAME := libutil
-AR_LIB_NAME := $(TOPDIR)lib/$(LIB_NAME).a
-SO_LIB_NAME = $(TOPDIR)lib/$(LIB_NAME).so
-SO_FULL_NAME = $(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-CSRC = $(wildcard *.c)
-ifneq ($(ARCH_HAS_MMU),y)
-CSRC := $(filter-out forkpty.c,$(CSRC))
-endif
-
-OBJS := $(patsubst %.c,%.o, $(CSRC))
-
-ifeq ($(HAVE_SHARED),y)
-all: $(SO_LIB_NAME)
-else
-all: $(AR_LIB_NAME)
-endif
-
-# psm: 20051007 gcc-4.1-head optimizes crypt()/__des_crypt() away
-# $(AR_LIB_NAME): $(LIB_NAME).o
-
-$(AR_LIB_NAME): $(OBJS)
- $(INSTALL) -d $(TOPDIR)lib
- $(RM) $@
- $(STRIPTOOL) -x -R .note -R .comment $^
- $(AR) $(ARFLAGS) $@ $^
-
-$(SO_LIB_NAME): $(AR_LIB_NAME)
- $(RM) $(TOPDIR)lib/$(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION) $@
- $(LD) $(LDFLAGS) -soname=$(LIB_NAME).so.$(MAJOR_VERSION) \
- -o $(TOPDIR)lib/$(SO_FULL_NAME) --whole-archive $< \
- --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
- -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC)
- $(LN) -sf $(SO_FULL_NAME) $(SO_LIB_NAME).$(MAJOR_VERSION)
- $(LN) -sf $(SO_FULL_NAME) $@
-
-$(LIB_NAME).o: $(CSRC)
- $(CC) $(CFLAGS) -o $@ -c $^
-
-$(OBJS): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
-clean:
- $(RM) *.o *~ core
+top_srcdir=../
+top_builddir=../
+include $(top_builddir)Rules.mak
+all: libs
+include Makefile.in
+include $(top_srcdir)Makerules
diff --git a/libutil/Makefile.in b/libutil/Makefile.in
index f6396a627..bc6943aeb 100644
--- a/libutil/Makefile.in
+++ b/libutil/Makefile.in
@@ -22,7 +22,11 @@ libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
endif
libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
+ifeq ($(DOPIC),y)
+libutil-a-y := $(libutil_OBJ:.o=.os)
+else
libutil-a-y := $(libutil_OBJ)
+endif
libutil-so-y := $(libutil_OBJ:.o=.os)
libutil-multi-y := $(libutil_SRC)
@@ -31,7 +35,11 @@ lib-a-y += $(top_builddir)lib/libutil.a
lib-so-y += $(top_builddir)lib/libutil.so
objclean-y += libutil_clean
-$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a libc-y
+ifeq ($(DOPIC),y)
+$(top_builddir)lib/libutil.so: $(top_builddir)lib/libutil.a $(libc)
+else
+$(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc)
+endif
$(call link.so,$(libutil_FULL_NAME),$(MAJOR_VERSION))
$(libutil_OUT)/libutil_so.a: $(libutil-so-y)
@@ -39,11 +47,7 @@ $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
$(do_strip)
$(do_ar)
-ifeq ($(DOPIC),y)
-$(top_builddir)lib/libutil.a: $(libutil-a-y:.o=.os)
-else
$(top_builddir)lib/libutil.a: $(libutil-a-y)
-endif
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
$(do_strip)
diff --git a/libutil/forkpty.c b/libutil/forkpty.c
index af1d4becc..6843221cd 100644
--- a/libutil/forkpty.c
+++ b/libutil/forkpty.c
@@ -3,19 +3,22 @@
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define openpty __openpty
+#define login_tty __login_tty
#include <sys/types.h>
#include <termios.h>
@@ -23,30 +26,34 @@
#include <utmp.h>
#include <pty.h>
-int forkpty (int *amaster, char *name,
- struct termios *termp, struct winsize *winp)
+int
+forkpty (amaster, name, termp, winp)
+ int *amaster;
+ char *name;
+ struct termios *termp;
+ struct winsize *winp;
{
- int master, slave, pid;
+ int master, slave, pid;
- if (openpty (&master, &slave, name, termp, winp) == -1)
- return -1;
+ if (openpty (&master, &slave, name, termp, winp) == -1)
+ return -1;
- switch (pid = fork ())
+ switch (pid = fork ())
{
- case -1:
- return -1;
- case 0:
- /* Child. */
- close (master);
- if (login_tty (slave))
- _exit (1);
-
- return 0;
- default:
- /* Parent. */
- *amaster = master;
- close (slave);
-
- return pid;
+ case -1:
+ return -1;
+ case 0:
+ /* Child. */
+ close (master);
+ if (login_tty (slave))
+ _exit (1);
+
+ return 0;
+ default:
+ /* Parent. */
+ *amaster = master;
+ close (slave);
+
+ return pid;
}
}
diff --git a/libutil/login_tty.c b/libutil/login_tty.c
index d354407f2..5ae31c52d 100644
--- a/libutil/login_tty.c
+++ b/libutil/login_tty.c
@@ -36,7 +36,7 @@
#include <fcntl.h>
#include <utmp.h>
-int login_tty(int fd)
+int attribute_hidden __login_tty(int fd)
{
(void) setsid();
#ifdef TIOCSCTTY
@@ -67,3 +67,5 @@ int login_tty(int fd)
(void) close(fd);
return (0);
}
+
+strong_alias(__login_tty,login_tty)
diff --git a/libutil/logout.c b/libutil/logout.c
index cf964e4dd..08094d41d 100644
--- a/libutil/logout.c
+++ b/libutil/logout.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <string.h>
@@ -30,7 +30,8 @@ logout (const char *line)
int result = 0;
/* Tell that we want to use the UTMP file. */
- utmpname (_PATH_UTMP);
+ if (utmpname (_PATH_UTMP) == -1)
+ return 0;
/* Open UTMP file. */
setutent ();
@@ -50,7 +51,16 @@ logout (const char *line)
memset (ut->ut_host, 0, sizeof ut->ut_host);
#endif
#if _HAVE_UT_TV - 0
+# if __WORDSIZE_COMPAT32 == 0
gettimeofday (&ut->ut_tv, NULL);
+# else
+ {
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ ut->ut_tv.tv_sec = tv.tv_sec;
+ ut->ut_tv.tv_usec = tv.tv_usec;
+ }
+# endif
#else
time (&ut->ut_time);
#endif
diff --git a/libutil/logwtmp.c b/libutil/logwtmp.c
index 35d809d96..c6a8530ca 100644
--- a/libutil/logwtmp.c
+++ b/libutil/logwtmp.c
@@ -1,21 +1,22 @@
/* wtmp support rubbish (i.e. complete crap)
- *
- * Written by Erik Andersen <andersee@debian.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 675 Mass Ave,
- * Cambridge, MA 02139, USA. */
+
+ Written by Erik Andersen <andersee@debian.org>
+
+ The GNU C Library is free software
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
#include <sys/time.h>
@@ -36,7 +37,16 @@ void logwtmp (const char *line, const char *name, const char *host)
strncpy(lutmp.ut_line, line, sizeof(lutmp.ut_line)-1);
strncpy(lutmp.ut_name, name, sizeof(lutmp.ut_name)-1);
strncpy(lutmp.ut_host, host, sizeof(lutmp.ut_host)-1);
+#if __WORDSIZE_COMPAT32 == 0
gettimeofday(&(lutmp.ut_tv), NULL);
+#else
+ {
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ lutmp.ut_tv.tv_sec = tv.tv_sec;
+ lutmp.ut_tv.tv_usec = tv.tv_usec;
+ }
+#endif
updwtmp(_PATH_WTMP, &(lutmp));
}
diff --git a/libutil/openpty.c b/libutil/openpty.c
index f0574474b..ac3e496ed 100644
--- a/libutil/openpty.c
+++ b/libutil/openpty.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <fcntl.h>
@@ -72,7 +72,7 @@ pts_name (int fd, char **pts, size_t buf_len)
if (! new_buf)
{
rv = -1;
- errno = ENOMEM;
+ __set_errno (ENOMEM);
break;
}
buf = new_buf;
@@ -90,8 +90,8 @@ pts_name (int fd, char **pts, size_t buf_len)
/* Create pseudo tty master slave pair and set terminal attributes
according to TERMP and WINP. Return handles for both ends in
AMASTER and ASLAVE, and return the name of the slave end in NAME. */
-int
-openpty (int *amaster, int *aslave, char *name, struct termios *termp,
+int attribute_hidden
+__openpty (int *amaster, int *aslave, char *name, struct termios *termp,
struct winsize *winp)
{
#if 0
@@ -158,3 +158,5 @@ openpty (int *amaster, int *aslave, char *name, struct termios *termp,
close (master);
return -1;
}
+
+strong_alias(__openpty,openpty)