OSDN Git Service
Peter S. Mazinger [Sun, 13 Mar 2011 00:06:12 +0000 (01:06 +0100)]
alpha/__syscall_rt_sigaction.S: make the function hidden on non-NPTL
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sun, 13 Mar 2011 00:00:55 +0000 (01:00 +0100)]
remove unneeded hidden sigwaitinfo
use __sigwaitinfo in sigwait.c, since that is already hidden
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 23:55:15 +0000 (00:55 +0100)]
no need for hidden sigtimedwait
remove unneeded attribute_hidden too, as the prototype provides it
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 23:54:46 +0000 (00:54 +0100)]
setjmp.h: sync with glibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 23:43:07 +0000 (00:43 +0100)]
tgmath.h: sync with glibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 23:36:00 +0000 (00:36 +0100)]
parser_config.[ch]: remove duplicated hidden functions
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 23:29:45 +0000 (00:29 +0100)]
signal.h: move prototypes for __syscall_[rt_]sigaction to common place
solve inconsistency between archs
NPTL should not use __syscall_rt_sigaction at all, for now it needs to be visible
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 21:52:58 +0000 (22:52 +0100)]
libintl.h: add _(x) and N_(x) and use it everywhere
remove _LIBC part from rpc headers
include libintl.h to rpc_private.h and use that instead of rpc.h
include libintl.h anywhere else needed replacing _(x) and N_(x)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 21:01:27 +0000 (22:01 +0100)]
libc-internal.h: use a consistent prototype for __stack_chk_fail
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:56:14 +0000 (21:56 +0100)]
signal.h: provide prototype for __libc_sigaction and remove all others
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:43:52 +0000 (21:43 +0100)]
complex.h: sync a bit glibc to guard properly
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:37:42 +0000 (21:37 +0100)]
use one common prototype for _create_xid
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:32:37 +0000 (21:32 +0100)]
remove subdir include/internal on install
overseen this on an earlier commit
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:26:01 +0000 (21:26 +0100)]
rpc_private.h: change guard
need another guard, else rpc/rpc.h might not be included
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 20:24:44 +0000 (21:24 +0100)]
remove __FORCE_GLIBC
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:55:47 +0000 (20:55 +0100)]
getopt.c, getopt.h: avoid the need for __FORCE_GLIBC
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:53:43 +0000 (20:53 +0100)]
do not include libc-internal.h
it is already included by features.h
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:45:04 +0000 (20:45 +0100)]
locale.h, xlocale.h: guard *locale functions correctly
change the guard from LOCALE to XLOCALE for uselocale/newlocale...
move locale_t to xlocale.h
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:41:33 +0000 (20:41 +0100)]
do not include xlocale.h, it is included by locale.h when needed
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:36:47 +0000 (20:36 +0100)]
signal.h: disable sigvec() and guard related stuff with STRICT_HEADERS
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:34:10 +0000 (20:34 +0100)]
time.h: update and guard internals
guard internal constant with _LIBC
strftime_l is SuSv4
reorder a bit to ease syncing with glibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:31:23 +0000 (20:31 +0100)]
inet_addr.c, inet_makeaddr.c: used the correct section from addr.c
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:28:17 +0000 (20:28 +0100)]
rpc_msg.h: move xdr_accepted_reply and xdr_received_reply from rpc.h
glibc does not provide these prototypes
libtirpc provides them in rpc_msg.h, copied comments from there
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:26:41 +0000 (20:26 +0100)]
crypt.h: use __const instead of const
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:24:03 +0000 (20:24 +0100)]
no need for hidden inet_ntoa_r
it is reused within the same file, solve it through a static function
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:22:14 +0000 (20:22 +0100)]
remove unneeded hiddens for rtime, basename, strtof* and wcstof*
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:17:16 +0000 (20:17 +0100)]
dirent.h: disable getdirentries not provided by uClibc
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 19:14:22 +0000 (20:14 +0100)]
dirent.h: s:__XOPEN_2K8:__USE_XOPEN2K8:
glibc has it wrong as well
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger [Sat, 12 Mar 2011 18:53:39 +0000 (19:53 +0100)]
wordexp.c, sysconf.c: include ctype.h for isspace
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 15 Jun 2012 11:44:35 +0000 (13:44 +0200)]
ldso: use .arm mode for resolver unconditionally
as per comment in the file.
Fixes runtime with __THUMB_INTERWORK__ enabled.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Filippo Arcidiacono [Tue, 12 Jun 2012 09:05:25 +0000 (11:05 +0200)]
libc: sh: fixed typo in ucontext header
Fixed typo in ucontext header, NFPREG wrongly defined twice instead of
NGREG for general registers and NFPREG for floating point register.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Wed, 13 Jun 2012 09:17:14 +0000 (11:17 +0200)]
buildsys: prune pthread bits from arch headers
Pickup the correct version of e.g. local_lim.h as seen on ppc
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Kevin Cernekee [Thu, 7 Jun 2012 18:32:24 +0000 (11:32 -0700)]
buildsys: clean up libubacktrace linker script handling
Currently, the installed libubacktrace linker script entry always uses
HARDWIRED_ABSPATH semantics, even if HARDWIRED_ABSPATH is disabled:
$ grep GROUP $PREFIX/mipsel-linux-uclibc/sys-root/usr/lib/libc.so
GROUP ( libc.so.0 uclibc_nonshared.a AS_NEEDED ( ld-uClibc.so.0 ) )
GROUP ( AS_NEEDED ( /lib/libubacktrace.so.0 ) )
This causes problems when building a non-sysroot toolchain.
Move the AS_NEEDED insertion into libc/Makefile.in, and add a case to
the HARDWIRED_ABSPATH substitution command so libubacktrace is handled
the same way as the other libraries listed in the script.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mark Salter [Wed, 6 Jun 2012 20:44:45 +0000 (16:44 -0400)]
Update C6X support
This patch updates the C6X support to work with latest uClibc code and
uses reworked DSBT support to allow using kernel FDPIC loader.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 11 Jun 2012 12:28:10 +0000 (14:28 +0200)]
libubacktrace: arm: Fix typo in assert
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 11 Jun 2012 12:27:18 +0000 (14:27 +0200)]
buildsys: fix typo in help
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Khem Raj [Sun, 10 Jun 2012 16:36:23 +0000 (09:36 -0700)]
eventfd: Implement eventfd2 and fix eventfd
eventfd: evntfd assumes to take two arguments instead it
should be one evntfd expects two therefore implement both syscalls with
correct parameters
Thanks Eugene Rudoy for reporting it and also providing the patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Kevin Cernekee [Tue, 5 Jun 2012 22:05:20 +0000 (15:05 -0700)]
MIPS: Use $a0 instead of $v0 for __syscall_error() argument
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately,
__syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI
standard. This means that if lazy binding was used for __syscall_error(),
the errno value in $v0 could get corrupted.
The problem can be easily seen in testcases where syscalls in librt fail;
when librt tries to call __syscall_error() in libc, the argument gets
lost and errno gets set to a bogus value:
# ./tst-mqueue1 ; echo $?
mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error
2004684208
1
# ./tst-mqueue2 ; echo $?
mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error
1997360560
1
# ./tst-mqueue4 ; echo $?
mq_timedsend did not fail with ETIMEDOUT: Unknown error
2008747440
1
When _dl_runtime_resolve() was taken out of the equation, the same test
cases passed:
# LD_BIND_NOW=y ./tst-mqueue1 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue2 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue4 ; echo $?
0
Changing __syscall_error() to look at $a0 instead of $v0 fixed the
problem.
(Note that there is also a "__syscall_error.c" file which presumably
uses the standard C calling conventions, but I do not think it is used
on MIPS.)
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Kevin Cernekee [Tue, 5 Jun 2012 22:05:19 +0000 (15:05 -0700)]
MIPS: Convert __syscall_error() callers to use $a0 for argument
Some callers passed the first argument in $v0, while others used $a0.
Change the callers to use $a0 consistently.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Filippo Arcidiacono [Wed, 30 May 2012 15:11:12 +0000 (17:11 +0200)]
ldso: preload standard path library with setuid bit set
For set-user-ID/set-group-ID ELF binaries, only libraries in the standard
search directories that are also set-user-ID must be loaded.
This patch fixes existing logic according to the above statement.
Furthermore if either library setuid bit isn't set or it cannot be found in
the standard search path, the library won't be preloaded but execution go
ahead with default one.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mark Salter [Tue, 22 May 2012 14:53:29 +0000 (10:53 -0400)]
Clean up DSBT support
The existing DSBT support relies on the kernel to provide DSBT info
as part of the load maps passed to user space. The problem with this
approach is that the DSBT info is in the dynamic section, so the
kernel must access a userspace mapping of the dynamic section (or
separately read a copy for the kernel) in order to retrieve the
information needed by userspace.
This patch reworks the DSBT support to remove the reliance on DSBT
info coming from the kernel. Instead, ldso reads the info itself from
the dynamic section. One other benefit of this is that it allows the
existing kernel FDPIC loader to also load DSBT binaries.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Wed, 30 May 2012 05:40:33 +0000 (01:40 -0400)]
pread/pwrite: drop fallback funcs
Linux has provided these functions since the 2.1.x era, so no need to
keep these around. We'd rather find out when things are missing (and
fix that) than fall back to the unsafe hacks.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 30 May 2012 05:15:03 +0000 (01:15 -0400)]
pread/pwrite: handle renamed syscalls in common/ppc/xtensa code
Some arches got this fix, but many did not. So copy the ifdef logic to
the ones that missed it to fix behavior in linux-2.6+.
URL: https://bugs.busybox.net/show_bug.cgi?id=5258
Reported-by: David Laight <david.laight@aculab.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sedat Dilek [Thu, 17 May 2012 13:18:30 +0000 (15:18 +0200)]
Makerules: Remove duplicated slashes in interp.c
Peter Mazinger says in [1]:
"I can revert it to the old behaviour in master (the change s://:/: should stay though)."
[1] http://lists.uclibc.org/pipermail/uclibc/2011-March/045049.html
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sedat Dilek [Thu, 17 May 2012 13:18:29 +0000 (15:18 +0200)]
Revert "Makerules: respect HARDWIRED_ABSPATH in interp.c"
This reverts commit
5dffed7dd1a413f3965af702fa7ecd79809d1988.
This breaks ldd when HARDWIRED_ABSPATH=n.
[1] http://lists.uclibc.org/pipermail/uclibc/2011-March/045048.html
From: Timo Teräs <timo.teras@iki.fi>
Your commit
5dffed7dd1a413f3965af702fa7ecd79809d1988 removed absolute
path from the interpreter binary name embedded in ELF files.
This makes ldd seg.fault as it seems to assume absolute paths.
gdb sayeth:
(gdb) where
#0 0x00111ae3 in find_elf_interpreter (ehdr=0xb7a74000) at
../utils/ldd.c:556
#1 0x00111f2a in find_dependencies (filename=0x114910
"/home/fabled/aports/main/libc0.9.32/src/uClibc-0.9.32-rc3/lib/librt.so.0.9.32")
at ../utils/ldd.c:676
#2 0x0011228e in main (argc=1, argv=0xbffff6e8) at ../utils/ldd.c:777
(gdb) p tmp
tmp = NULL
(gdb) p interp_dir
$1 = 0x116660 "ld-uClibc.so.0.9.32"
[2] http://lists.uclibc.org/pipermail/uclibc/2011-March/045054.html
From: Mike Frysinger <vapier@gentoo.org>
On Wed, Mar 23, 2011 at 7:18 AM, Peter Mazinger wrote:
>> Your commit
5dffed7dd1a413f3965af702fa7ecd79809d1988 removed absolute
>> path from the interpreter binary name embedded in ELF files.
>
> do you consider my patch wrong?
yes. the absolute path to the ldso must be encoded in binaries. the
point of HARDWIRED_ABSPATH is purely for sysroot/non-sysroot
toolchain, and the interp path isnt involved with that.
are you sure this even works at runtime ? i'm pretty sure the kernel
doesnt do any path lookups on the interp string.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
James Hogan [Thu, 17 May 2012 11:42:54 +0000 (12:42 +0100)]
mmap()->sys_mmap2: do unsigned shift of offset
Fix the implementation of mmap based on the mmap2 system call, to
construct pgoffset from offset with an unsigned shift rather than a
signed (off_t) shift. The mmap2 test in the testsuite catches this case
by mmap'ing with a large offset (with the sign bit set). The signed
shift repeats the sign bit making the page shift way out of range. This
is already fixed similarly in mmap64().
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 6 May 2012 07:50:44 +0000 (03:50 -0400)]
stdio: implement assignment-allocation "m" character
The latest POSIX spec introduces a "m" character to allocate buffers for
the user when using scanf type functions. This is like the old glibc "a"
flag, but now standardized. With packages starting to use these, we need
to implement it.
for example:
char *s;
sscanf("foo", "%ms", &s);
printf("%s\n", s);
free(s);
This will automatically allocate storage for "s", read in "foo" to it,
and then display it.
I'm not terribly familiar with the stdio layer, so this could be wrong.
But it seems to work for me.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Filippo Arcidiacono [Tue, 8 May 2012 13:42:48 +0000 (15:42 +0200)]
ldso: sh: handle _dl_skip_args in linker startup instead of __uClibc_main
Handle _dl_skip_args in the asm part of the dynamic linker startup,
to skip the ldso arguments, so we can keep this symbol hidden as other archs do.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Tue, 15 May 2012 07:11:01 +0000 (09:11 +0200)]
ldd: tweak whitespace
Tweak whitespace in preprocessor conditionals. No obj-code changes.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 9 May 2012 06:25:48 +0000 (08:25 +0200)]
Revert "help: Document CROSS="
This reverts commit
5e0dbdb9e5acdcf7dea29335a5db065f48c58766.
CROSS is only a compat thing and should not be advertised
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 May 2012 19:22:51 +0000 (21:22 +0200)]
ldd.host: Fix compilation for STANDALONE support
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 May 2012 17:53:55 +0000 (19:53 +0200)]
help: Document CROSS=
should maybe better read "override CROSS_COMPILE from above"
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 May 2012 17:49:55 +0000 (19:49 +0200)]
help: Document BUILD_CFLAGS and BUILD_LDFLAGS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 May 2012 17:37:08 +0000 (19:37 +0200)]
utils: pass in config flags for ldd
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 May 2012 17:20:09 +0000 (19:20 +0200)]
ldd: silence warning if !LDSO_LDD_SUPPORT
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Sat, 5 May 2012 19:04:53 +0000 (15:04 -0400)]
linuxthreads.old: fix build warnings with epoll enabled
Pull in the epoll header for the epoll structs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mark Salter [Fri, 4 May 2012 12:18:46 +0000 (08:18 -0400)]
drop support for old systems lacking vfork
Only really old systems (<=linux-2.0) lack a dedicated vfork system call.
The code that is in place to support them is causing issues with newer
arches that also don't provide a vfork system call -- instead, they do
vfork by calling clone in userspace.
If anyone cares about these really old systems, they can submit a patch
to make the system work with them while not breaking newer systems.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 5 May 2012 05:46:30 +0000 (01:46 -0400)]
docs: restore crt from old svn tree
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Thu, 3 May 2012 11:27:17 +0000 (13:27 +0200)]
config: tweak STRICT_HEADERS description
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 3 May 2012 11:04:14 +0000 (13:04 +0200)]
rpmatch: provide out-of-line implementation
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 3 May 2012 08:58:24 +0000 (10:58 +0200)]
rpmatch: make decl parsable
Mike, it would have been much simpler to just leave the header impl-free
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Wed, 2 May 2012 05:14:17 +0000 (01:14 -0400)]
rpmatch: fix previous commit w/C++ compilers
The throw markings on the inline func trigger errors when building with
C++. Since this inline version doesn't throw any exceptions, just drop
the markings completely and be done with it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 30 Apr 2012 04:40:49 +0000 (00:40 -0400)]
rpmatch: simple inline version
Since rpmatch will match ^[Yy] and ^[Nn] regardless of locale, this
lets us create a simple inline version. Newer procps versions use
this function.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 29 Apr 2012 03:51:56 +0000 (23:51 -0400)]
epoll.h: sync with glibc
Since glibc has split out arch-specific stuff to bits/epoll.h, we can
pull that sanity back into our tree and drop the arch ifdefs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mark Salter [Thu, 26 Apr 2012 14:14:49 +0000 (10:14 -0400)]
llseek: support __NR_llseek syscall
Older kernels use __NR__llseek for a 64-bit lseek syscall. Newer
kernels use __NR_llseek. This patch fixes the implementation of
lseek64 to use the __NR_llseek syscall if it exists.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mark Salter [Thu, 26 Apr 2012 14:14:01 +0000 (10:14 -0400)]
getpgrp: fix fallback handling
The test for generating a stub for getpgrp was wrong and would
result in duplicate symbols when building without __NR_getpgrp,
but with __NR_getpgid and __NR_getpid.
A closer look at the getpgrp implementation using getpgid showed
that getpid was being called to pass the current pid to getpgid.
This is unnecessary because passing 0 to getpgid returns the
pgid of the current process.
This patch cleans up the getpgrp implementation and the stub test.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Thu, 26 Apr 2012 14:30:42 +0000 (16:30 +0200)]
arm: use PATH_MEM in ioperm()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Thu, 26 Apr 2012 07:24:38 +0000 (09:24 +0200)]
mmap64: Use correct type for offset parameter
Some arches check the size in INLINE_SYSCALL() and barf if it's
too big (i.e. a 64bit value getting truncated to 32bit).
Satisfy error-check on ppc32.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Wed, 25 Apr 2012 12:13:49 +0000 (14:13 +0200)]
atomic.h: handle new mips R10K errata
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Tue, 24 Apr 2012 05:38:45 +0000 (01:38 -0400)]
linuxthreads.old: refactor nommu logic a little to avoid mmu warning
Should be no functional changes; just fixing:
libpthread/linuxthreads.old/manager.c: In function 'pthread_free':
libpthread/linuxthreads.old/manager.c:707:9: warning:
variable 'h_bottom_save' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 24 Apr 2012 05:33:41 +0000 (01:33 -0400)]
linuxthreads.old: pass back up saved_errno value in manager init
This matches the newer linuxthreads code, and fixes the build warning:
libpthread/linuxthreads.old/manager.c: In function 'pthread_handle_create':
libpthread/linuxthreads.old/manager.c:487:7: warning:
variable 'saved_errno' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 24 Apr 2012 05:30:31 +0000 (01:30 -0400)]
linuxthreads.old: fix set-but-unused warning
Move spin_count down to the code block where it's used to fix the warning:
libpthread/linuxthreads.old/spinlock.c: In function '__pthread_lock':
libpthread/linuxthreads.old/spinlock.c:70:7: warning:
variable 'spin_count' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 24 Apr 2012 05:25:48 +0000 (01:25 -0400)]
linuxthreads.old: fix typo in pthread_mutex_unlock hidden prototype
Reported-by: Tony Wu <tung7970@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 23 Apr 2012 03:34:31 +0000 (23:34 -0400)]
getconf: include a newline in error messages
The normal error() func implicitly appends a newline, so make sure we do
the same. Otherwise getconf outputs an error message like so:
prompt$ getconf -h
Unrecognized variable `-h'prompt$
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 22 Apr 2012 21:35:03 +0000 (17:35 -0400)]
linuxthreads.old: only declare __pthread_xxx funcs hidden inside of libpthread
These stubs get used in libc as forwarding funcs, so we don't want them
labeled as hidden. Otherwise, attempting to use them in other libraries
(like libdl) will result in references to symbols that only libpthread
provides. Such as:
/usr/bin/python2.6: can't resolve symbol '__pthread_mutex_lock' in lib '/lib/libdl.so.0'.
This also brings the old code in line with the newer linuxthreads.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 22:31:03 +0000 (00:31 +0200)]
sysconf: use getrlimit to determine ARG_MAX
getrlimit previously was only called for NPTL (why?), fix that to be
used everywhere.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 22:09:02 +0000 (00:09 +0200)]
config: Fix alphabetical sort order of targets
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 22:06:52 +0000 (00:06 +0200)]
ldd: silence warnings
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 21:19:16 +0000 (23:19 +0200)]
locale: avoid segfault freelocale()
PR 4964
Eric Nadler writes:
It looks to me like the base structure is not fully initialized
with 0 (only a subset of the structure is initialized).
This later results in a free of base->collate.index2weight in
_locale_set_l.
This free tries to free uninitialized memory and segfaults.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 21:15:40 +0000 (23:15 +0200)]
test: Ignore various test objects in locale
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Ed W [Tue, 17 Apr 2012 11:13:32 +0000 (12:13 +0100)]
wchar: Fix BOM emitting in iconv_open()
Fix incorrect output of BOM when converting charactersets by name. Only
affective when iconv/locale enabled.
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 20:05:07 +0000 (22:05 +0200)]
ipc: eventually use stat64 in ftok()
PR 4201
ftok() always used 32bit stat
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 16:35:05 +0000 (18:35 +0200)]
resolv: tiny shrinkage in /etc/hosts handling
-4b
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 15:57:54 +0000 (17:57 +0200)]
resolv: remove unused variables
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 15:54:09 +0000 (17:54 +0200)]
resolv: Fix /etc/hosts for more than MAXALIASES aliases
PR networking/4916
Reserve space for the terminating 0 alias and zero out the
scratch-buffer so the last entry of the alias list is empty.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 15:47:08 +0000 (17:47 +0200)]
parse_config: tweak indentation
and shuffle tokens memsetting around.
No obj-code changes.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Alexander Komyagin [Wed, 4 Apr 2012 08:58:37 +0000 (12:58 +0400)]
getaddrinfo(): avoid call to __check_pf() when not needed
__check_pf() function is called from getaddrinfo() and it calls
getifaddrs(), which is too much overhead especially if RSBAC-Net
is enabled. So with this patch __check_pf() is being called only
when AI_ADDRCONFIG hint flag is specified - just when we really
need that check.
Signed-off-by: Alexander Komyagin <komyagin@altell.ru>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Ed W [Mon, 16 Apr 2012 22:27:55 +0000 (23:27 +0100)]
inet: adjust handling of cacnonname in getaddrinfo
Posix says that canonname should use the text representation of an IP address
when a numerical nodename given
See: http://pubs.opengroup.org/onlinepubs/
9699919799/functions/getaddrinfo.html
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Wed, 11 Apr 2012 20:05:08 +0000 (16:05 -0400)]
mmap64: use INLINE_SYSCALL() helper
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 11 Apr 2012 20:01:29 +0000 (16:01 -0400)]
mmap64: include stdint.h for uint64_t
Some targets include this implicitly, but pull it in explicitly for those
which don't to fix building for them.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 10 Apr 2012 04:27:04 +0000 (00:27 -0400)]
mmap64: always use unsigned 64bit offsets
The current code will sometimes cast the offset to an unsigned long.
On 32bit systems, that doesn't make much sense since we always know
that the off64_t type is 64bits. So drop the ifdef logic, cast it
to an unsigned 64bit value, and then do the shift.
If the system is 32bits, and the address is still too large, then
there's really nothing we could do about it anyways, so the extra
ifdef logic wasn't helping.
URL: https://bugs.busybox.net/show_bug.cgi?id=3853
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sat, 7 Apr 2012 20:31:31 +0000 (13:31 -0700)]
test/misc: Add tst-inotify
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sat, 7 Apr 2012 20:31:30 +0000 (13:31 -0700)]
test/inet: Add tst-sock-nonblock
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sat, 7 Apr 2012 20:31:29 +0000 (13:31 -0700)]
test/time: Add tst-timerfd
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sat, 7 Apr 2012 20:31:28 +0000 (13:31 -0700)]
test/signal: Add tst-signalfd
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 20:03:13 +0000 (16:03 -0400)]
MAKEALL: add more arch aliases
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 19:54:17 +0000 (15:54 -0400)]
MAKEALL: fix cross-compiler lookup breakage after CROSS cleanup
Commit
ae14cd49a8da6e62e35636 broke testing of multiple arches in one go.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 18:54:23 +0000 (14:54 -0400)]
MAKEALL: also check for gnu suffixed toolchains too
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 19:36:28 +0000 (15:36 -0400)]
alpha: trim crt code to fix build errors
Otherwise we get:
/tmp/cc14nHjG.s: Assembler messages:
/tmp/cc14nHjG.s: Error: .size expression for _init does not evaluate to a constant
/tmp/cc14nHjG.s: Error: .size expression for _fini does not evaluate to a constant
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sun, 8 Apr 2012 18:43:02 +0000 (11:43 -0700)]
signalfd.h: Use new "bits/" scheme for arch-specific flags
glibc has split off the arch-specific flag definitions (like
SFD_NONBLOCK) into <arch>/bits/signalfd.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>