OSDN Git Service
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>
Kevin Cernekee [Sun, 8 Apr 2012 18:43:01 +0000 (11:43 -0700)]
timerfd.h: Use new "bits/" scheme for arch-specific flags
glibc has split off the arch-specific flag definitions (like
TFD_NONBLOCK) into <arch>/bits/timerfd.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>
Kevin Cernekee [Sun, 8 Apr 2012 18:43:00 +0000 (11:43 -0700)]
inotify.h: Use new "bits/" scheme for arch-specific flags
glibc has split off the arch-specific flag definitions (like
IN_NONBLOCK) into <arch>/bits/inotify.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>
Kevin Cernekee [Sun, 8 Apr 2012 18:42:59 +0000 (11:42 -0700)]
inotify_rm_watch: Change second argument to int
2009-01-30 Ulrich Drepper <drepper@redhat.com>
[BZ #7040]
* sysdeps/unix/sysv/linux/sys/inotify.h: Second parameter of
inotify_rm_watch should have type int.
This change allows us to copy inotify.h verbatim from glibc into uClibc.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Kevin Cernekee [Sat, 7 Apr 2012 20:31:25 +0000 (13:31 -0700)]
test: Ignore various test objects
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 04:52:50 +0000 (00:52 -0400)]
regex: silence set-but-unused warnings
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Filippo Arcidiacono [Fri, 6 Apr 2012 09:18:35 +0000 (11:18 +0200)]
ldso: fix fdpic support broken from prelink patch
The fdpic support has been broken since the prelink support was added,
because it didn't take into account DL_LOADADDR_TYPE could be a different
type of ElfW(Addr).
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 04:32:56 +0000 (00:32 -0400)]
bfin: set an invalid insn for abort
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 8 Apr 2012 04:18:28 +0000 (00:18 -0400)]
buildsys: fix building with make-3.82+
We can't merge pattern and normal rules as newer make barfs:
*** mixed implicit and normal rules. Stop.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Wed, 4 Apr 2012 16:08:09 +0000 (18:08 +0200)]
librt: convince spawn to compile for !LFS
Great to have this valuable family of high kwalitee functions in here.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 4 Apr 2012 15:58:48 +0000 (17:58 +0200)]
stubs: Disregard LFS
Fixes handling of e.g. splice
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 4 Apr 2012 05:53:47 +0000 (07:53 +0200)]
.gitignore: Ignore dump files
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 30 Mar 2012 16:32:15 +0000 (18:32 +0200)]
buildsys: remove duplicate rule around defconfigs
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Mon, 2 Apr 2012 04:37:10 +0000 (00:37 -0400)]
fchmodat: fix handling of flags
The Linux syscall takes 3 args, not 4. We have to process flags in
userspace ourselves.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 03:50:12 +0000 (23:50 -0400)]
ldso: mark _start hidden
There's no need to export this symbol, so mark them all hidden.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Wed, 28 Mar 2012 07:44:53 +0000 (09:44 +0200)]
stdio: Fix char signedness in _load_inttype()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 27 Mar 2012 11:38:58 +0000 (13:38 +0200)]
buildsys: Fix typo in check-as-var handling
Missing second expansion with _v.
This led to wrong args passed down to assembler.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Tue, 27 Mar 2012 03:54:32 +0000 (23:54 -0400)]
ldso: bfin: add alias from __start to _start
On Blackfin systems, we have underscore prefixes in our ABI. So instead
of _start, we use __start. However, the makefile explicitly sets _start
as the entry point to support toolchains that implicitly use other symbols
as the default entry. It's easy enough to add a hidden alias in the
Blackfin code for free to support this.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 03:41:25 +0000 (23:41 -0400)]
spawn: fix building on no-mmu systems
We don't have fork() on no-mmu, so if we're going to end up calling it,
return ENOSYS instead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 03:37:21 +0000 (23:37 -0400)]
spawn: do not require C99 style
Simple style tweak to build with older standards.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 03:34:37 +0000 (23:34 -0400)]
spawn: use glibc style to keep differences down
There's no point in reformatting the code style when we're sourcing
most of it from glibc. Further, the changed style breaks with older
compilers, and pollutes the namespace with non-double leading under-
scores.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 02:58:37 +0000 (22:58 -0400)]
ldso: bfin: tweak style
No functional changes here. We don't need line continuations as gcc
is smart enough to merge the multiple strings for us.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 02:13:11 +0000 (22:13 -0400)]
arm: disable ioperm/iopl stubs
ARM always provides its own userspace funcs for ioperm/iopl.
They've never had syscalls. So disable the stubs on ARM to
avoid multiple definition errors.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 27 Mar 2012 01:44:40 +0000 (21:44 -0400)]
Revert "Fix redefinition of ioperm and iopl in stubs.c and arm/{ioperm.c,iopl.c}"
This reverts commit
3bcd031f97d61a8f732d865a0f4248aed2d191ab.
The arm code is supposed to provide its own userspace ioperm/iopl
functions. They've never had system calls for these funcs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Denys Vlasenko [Mon, 26 Mar 2012 14:01:51 +0000 (16:01 +0200)]
time.c: Readability improvements - no code changes
Pulled assignments out of ifs, added whitespace around operation symbols.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Bernhard Reutner-Fischer [Mon, 26 Mar 2012 09:25:33 +0000 (11:25 +0200)]
stubs: unified from future
Future branch extends stubs with ret_enosys_stub.
Resolve conflicts, and use superset of future and current master.
Adjust posix_fadvise* accordingly.
Upon future merge, pick this master version as the final state.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Jason Woodward [Wed, 8 Feb 2012 00:07:57 +0000 (19:07 -0500)]
Fix redefinition of ioperm and iopl in stubs.c and arm/{ioperm.c,iopl.c}
This fixes the following link failure:
LD libuClibc-0.9.33.so
libc/libc_so.a(stubs.os): In function `sync_file_range':
stubs.c:(.text+0x0): multiple definition of `ioperm'
libc/libc_so.a(ioperm.os):ioperm.c:(.text+0x260): first defined here
libc/libc_so.a(stubs.os): In function `sync_file_range':
stubs.c:(.text+0x0): multiple definition of `iopl'
libc/libc_so.a(iopl.os):iopl.c:(.text+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [lib/libc.so] Error 1
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Carmelo Amoroso [Wed, 14 Mar 2012 15:26:13 +0000 (16:26 +0100)]
nptl: fix compiler warning due to missing prototype
libpthread/nptl/sysdeps/pthread/pt-longjmp.c: In function 'longjmp':
libpthread/nptl/sysdeps/pthread/pt-longjmp.c:27:3: warning: implicit declaration of function '__libc_longjmp' [-Wimplicit-function-declaration]
libpthread/nptl/sysdeps/pthread/pt-longjmp.c:28:1: warning: 'noreturn' function does return [enabled by default]
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 14 Mar 2012 15:22:19 +0000 (16:22 +0100)]
nptl: fix compiler warning due to unused-but-set-variable
gcc 4.6.x raises useful warnings due to unused-but-set-variable,
This patch fixes the following one by using properly preprocessor
guard
libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c: In function '__pthread_cond_timedwait':
libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c:103:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 14 Mar 2012 14:21:36 +0000 (15:21 +0100)]
inet:rpc: fix build in !NPTL case
__libc_once is not available / needed when multithreading support
is not enabled, so authnone_create() calls authnone_create_once()
directly.
When LT.{old,new} is used instead of NPTL, it needs to explicitly
include <bits/libc-lock.h> to get __libc_once to be visible.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Mike Frysinger [Sun, 27 Nov 2011 06:58:40 +0000 (01:58 -0500)]
ldso: use ELF_xxx()/ElfW() helpers
They expand into the same code, but using the ELF_xxx()/ElfW() macros
makes it much easier to spot similarities between code bases.
Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Denys Vlasenko [Mon, 12 Mar 2012 05:27:08 +0000 (22:27 -0700)]
stdio: prevent retries on fclose/fflush after write errors
Some test results:
The longer patch posted at Sun 14:46:24 +0100 made my target system
unbootable. I did not attempt to troubleshoot it, as we are focusing
our efforts on the shorter patch now.
The shorter patch posted at Mon 01:50:27 +0100 is a good start, but it
didn't completely fix the problem for me. I am posting an updated
version with a few changes at the end of this message; the patched
uClibc 0.9.32.1 tree passes both of my test cases.
My changes:
1) Need to break out of the loop on "hard" errors. Otherwise the
library call never returns:
open("/dev/null", O_RDONLY) = 4
dup2(4, 1) = 1
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
...
2) Move all of the error handling logic back into the "else" clause. In
particular, I believe we do not want to be checking errno unless
__WRITE() had indicated a failure, since the value may be undefined:
if (errno == EINTR
|| errno == EAGAIN
/* do we have other "soft" errors? */
) {
3) Whitespace/indentation consistency.
-- 8< --
From: Denys Vlasenko <vda.linux@googlemail.com>
Currently, uclibc retains buffered data on stdio write errors,
and subsequent fclose and fflush will try to write it out again
(in most cases, in vain).
Which results in something like this:
On Wednesday 26 January 2011 13:21, Baruch Siach wrote:
> Hi busybox list,
>
> I'm running the following command under strace (thanks Rob):
>
> echo 56 > /sys/class/gpio/export
>
> and I see the following output:
>
> write(1, "56\n", 3) = -1 EBUSY (Device or resource busy)
> write(1, "5", 1) = 1
>
> The first EBUSY is OK, since GPIO 56 is already requested. But the second
> write() attempt seems strange, and leads to an unwanted outcome. GPIO 5 gets
> exported.
This patch prevents that.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Ismael Luceno [Mon, 5 Mar 2012 08:43:49 +0000 (06:43 -0200)]
librt: add posix_spawn support
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Steve Bennett [Fri, 16 Mar 2012 00:45:32 +0000 (10:45 +1000)]
microblaze: add sys/user.h
A microblaze-specific sys/user.h is needed for (e.g.) strace,
so use this version from glibc.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Carmelo Amoroso [Thu, 15 Mar 2012 10:51:38 +0000 (11:51 +0100)]
ldso: remove duplicated assignment with TLS symbol
The tpnt field is already set, so not needed to assign it again.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Wed, 14 Mar 2012 14:39:12 +0000 (15:39 +0100)]
ldso:sh: fix compiler warning due to unused-but-set-variable
gcc 4.6.x raises useful warnings due to unused-but-set-variable,
This patch fixes the following one by using properly preprocessor
guard
In file included from ldso/libdl/libdl.c:129:0:
./ldso/ldso/sh/elfinterp.c: In function '_dl_do_reloc':
./ldso/ldso/sh/elfinterp.c:163:22: warning: variable 'tls_tpnt' set but not used [-Wunused-but-set-variable]
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Tue, 13 Mar 2012 18:49:38 +0000 (19:49 +0100)]
buildsys: do not add empty obj to archives
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Denys Vlasenko [Sun, 11 Mar 2012 12:33:49 +0000 (13:33 +0100)]
__stdio_WRITE: make code more readable. No code changes
Pulled assignments out of ifs.
do {...} while (1); is a weird method of writing "loop forever",
thus rewrote it.
No code changes: objdump output is the same.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Mike Frysinger [Mon, 5 Mar 2012 06:37:07 +0000 (01:37 -0500)]
librt: refactor source selection
Should make adding more knob control simpler as people only need
to modify one variable now (librt_filter_SRC).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Khem Raj [Mon, 13 Feb 2012 19:37:26 +0000 (11:37 -0800)]
arm: Do not use 'sed -r' to calculate IS_EABI
-r is not available on BSD sed so to keep
compatibility avoid using it.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Filippo Arcidiacono [Fri, 3 Feb 2012 15:41:44 +0000 (16:41 +0100)]
libdl: fix memleak for local scope of dlopened's needed libraries
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Tue, 7 Feb 2012 16:18:25 +0000 (17:18 +0100)]
tests:math: fix build of math tests for SH4
Rename libm-test-ulps-sh4 to libm-test-ulps-sh as the ULPS file
is expected to match pattern libm-test-ulps-$(TARGET_ARCH).
Indeed "sh4" is the TARGET_SUBARCH.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Filippo ARCIDIACONO [Mon, 23 Jan 2012 16:01:58 +0000 (17:01 +0100)]
tests:libdl: add a new test for symbol scope issue in dlclose
Test case to trigger an issue raised by the new symbol scope design,
that was erroneously removing local symbol scope from the global one
too early while dl-closing a shared library.
Based on original test-case by Khem Raj
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Reported-by: Khem Raj <raj.khem@gmail.com>
Carmelo Amoroso [Tue, 7 Feb 2012 15:02:48 +0000 (16:02 +0100)]
tests: fix tests build (LDFLAGS_GNUHASH not longer defined)
Since commit
a899b909, variable LDFLAGS_GNUHASH has been replaced
by CFLAG_-Wl--hash-style=gnu. This change has not been reported to
the tests buildsys.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Filippo ARCIDIACONO [Mon, 23 Jan 2012 14:44:14 +0000 (15:44 +0100)]
tests: add OMIT logic to remove compilation flag.
Add OMIT logic to remove compilation flags when compiling libraries,
binaries( both host and target)
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso [Thu, 2 Feb 2012 17:22:36 +0000 (18:22 +0100)]
inet:rpc: fix authnone_marshal in multithreading context
This is a port of glibc's fix by Zack Weinberg as reported
in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142312,
and discussed in http://sourceware.org/ml/libc-alpha/2002-04/msg00069.html
and following.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Khem Raj [Sat, 4 Feb 2012 04:06:55 +0000 (20:06 -0800)]
lstat/stat/fstat: Use 64bit version of syscall if available
This is needed for stat'ing loop devices > 255
since otherwise kernel returns EOVERFLOW becasue
it needs st_rdev/st_dev to be larger than 16bits but
in kernel it uses __old_kernel_stat for stat
syscall which has st_rdev/st_dev as unsigned short
Add a testcase
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Khem Raj [Fri, 3 Feb 2012 18:57:44 +0000 (10:57 -0800)]
Declare __err and pass it to INTERNAL_SYSCALL_NCS so subsequent macros can use it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Bernhard Reutner-Fischer [Wed, 1 Feb 2012 22:52:39 +0000 (23:52 +0100)]
bump version to 0.9.34-git
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 1 Feb 2012 21:21:04 +0000 (22:21 +0100)]
Release 0.9.33
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 29 Jan 2012 16:48:54 +0000 (17:48 +0100)]
tmpnam, tempnam are obsolete in SUSV4
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 29 Jan 2012 14:46:50 +0000 (15:46 +0100)]
handle signal-OBXSI.SUSv4.syms
A couple of sig functions are obsolete in SUSv4.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 29 Jan 2012 14:21:38 +0000 (15:21 +0100)]
nptl_db: handle SUSv4-OB
pthread_getconcurrency / pthread_setconcurrency is OBSOLETE in SUSv4
so disable pthread debug support too
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 29 Jan 2012 14:10:01 +0000 (15:10 +0100)]
test: ignore undefined symbols for API
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 29 Jan 2012 14:09:34 +0000 (15:09 +0100)]
config: ftw is SUSv4-obsolete
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 28 Jan 2012 20:57:49 +0000 (21:57 +0100)]
*: if !HAS_THREADS strong alias sigaction
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sat, 28 Jan 2012 19:53:19 +0000 (20:53 +0100)]
buildsys: fixup sigaction handling
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Carmelo Amoroso [Fri, 27 Jan 2012 12:35:57 +0000 (13:35 +0100)]
libubacktrace:arm: libgcc_eh.a not needed
Dummy symbol is __aeabi_unwind_cpp_pr is part of uclibc_shared.a
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Fri, 27 Jan 2012 12:19:05 +0000 (13:19 +0100)]
ldso: fix typo in debug message
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 27 Jan 2012 11:46:14 +0000 (12:46 +0100)]
buildsys: add cppcheck wrapper script (correct one)
Also incooperate vapier's suggestion on how to set REAL_CC once
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Carmelo Amoroso [Mon, 19 Sep 2011 13:58:53 +0000 (15:58 +0200)]
libc_arm: avoid multiple version of __aeabi_unwind_cpp_pr dummy code
Do not pollute libraries with its own implementation of __aeabi_unwind_cpp_pr1 code.
Just add it to uclibc_nonshared.a archive and share it.
This fixes build issue with static linking of application due to multiple symbol
definition in libgcc_eh-a and libpthread.a or librt.a
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Bernhard Reutner-Fischer [Thu, 26 Jan 2012 16:00:05 +0000 (17:00 +0100)]
buildsys: use single slash version of -print-whatever
The double slash variants are not documented (doc bug?) so better use
the single slash variants like we usually do.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 26 Jan 2012 14:26:47 +0000 (15:26 +0100)]
buildsys: turn off forced EXTRA_WARNINGS on i386
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 26 Jan 2012 14:15:23 +0000 (15:15 +0100)]
*: silence some warnings
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 19 Jan 2012 14:05:43 +0000 (15:05 +0100)]
syscall: flag ia64 syscall error path as unlikely
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 19 Jan 2012 14:04:40 +0000 (15:04 +0100)]
arm: tweak comment
harmless copy'n paste error
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>