OSDN Git Service

uclinux-h8/uClibc.git
14 years agoMerge remote branch 'origin/master' into nptl
Austin Foxley [Wed, 16 Dec 2009 03:19:39 +0000 (19:19 -0800)]
Merge remote branch 'origin/master' into nptl

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agofix typo that sneaked in with 9a7506
Natanael Copa [Tue, 15 Dec 2009 12:37:34 +0000 (12:37 +0000)]
fix typo that sneaked in with 9a7506

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agosh: fix endianess and optimise the SH4 memcpy
Giuseppe Cavallaro [Mon, 14 Dec 2009 15:45:49 +0000 (16:45 +0100)]
sh: fix endianess and optimise the SH4 memcpy

This patch fixes the big-endian code and adds a new optimization
only for little endian mode.
This optimization is based on prefetching and 64bit data transfer via FPU.
Tests shows that

----------------------------------------
 Memory bandwidth    |        Gain
                     | sh4-300 | sh4-200
----------------------------------------
 512 bytes to 16KiB  | ~20%    | ~25%
 from 32KiB to 16MiB | ~190%   | ~5%
----------------------------------------

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agosyslog: use send(MSG_NOSIGNAL) instead of write, thus no need to handle SIGPIPE
Denys Vlasenko [Sun, 13 Dec 2009 04:47:19 +0000 (05:47 +0100)]
syslog: use send(MSG_NOSIGNAL) instead of write, thus no need to handle SIGPIPE

Size changes by this and previous change:

text           data     bss     dec     hex filename
1151             13       2    1166     48e libc/misc/syslog/syslog.o
1093             10       2    1105     451 libc/misc/syslog/syslog.o
1047             10       2    1059     423 libc/misc/syslog/syslog.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosyslog: fix openlog(xx, LOG_KERN) and optimize a bit
Denys Vlasenko [Sun, 13 Dec 2009 03:00:52 +0000 (04:00 +0100)]
syslog: fix openlog(xx, LOG_KERN) and optimize a bit

The fix:

logfac == 0 in openlog(xx, logfac) is allowed now.
Corresponding internal openlog() call in vsyslog()
uses explicit LOG_USER in order to set it as a default
facility.

Optimizations:

mylock is not recursive now, since a single intenal call
of openlog is converted to a call to openlog_internal
which assumes that lock is already taken. No recursive
locking is possible now.

LogFacility is reduced to byte.

cache static LogFile in auto variable fd (smaller code).

vsyslog with bogus pri parameter wouldn't lock/unlock
and mess with signals - it will just return at once.

pass NULL as ident string in internal openlog call
- same effect as passing LogTag but smaller code.

comment out "if (LogTag)" checks - it is never NULL.

use the same struct sigaction for setting new sigaction
and for saving old one - saves ~32 bytes of stack.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoInclude bits/libc-lock.h to get __libc_once_define
Khem Raj [Fri, 11 Dec 2009 17:40:05 +0000 (09:40 -0800)]
Include bits/libc-lock.h to get __libc_once_define

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoGo back to using nptl_arch_headers
Austin Foxley [Fri, 11 Dec 2009 18:10:40 +0000 (10:10 -0800)]
Go back to using nptl_arch_headers

this is part of the revert of 641e7e36ad0a9

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoRevert "nptl: make build depend directly on nptl headers"
Austin Foxley [Fri, 11 Dec 2009 18:05:57 +0000 (10:05 -0800)]
Revert "nptl: make build depend directly on nptl headers"

This reverts commit 641e7e36ad0a9b2899b04f256c5b243ada7da279.

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoInclude bits/libc-lock.h to get __libc_once_define
Khem Raj [Fri, 11 Dec 2009 17:40:05 +0000 (09:40 -0800)]
Include bits/libc-lock.h to get __libc_once_define

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoget x86_64 nptl building
Austin Foxley [Fri, 11 Dec 2009 11:46:37 +0000 (03:46 -0800)]
get x86_64 nptl building

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agonptl: fix even more old style declarations
Austin Foxley [Fri, 11 Dec 2009 08:51:06 +0000 (00:51 -0800)]
nptl: fix even more old style declarations

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agonptl: fix a few more old style declerations
Austin Foxley [Thu, 10 Dec 2009 02:10:53 +0000 (18:10 -0800)]
nptl: fix a few more old style declerations

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agonptl: fix old style function declerations
Austin Foxley [Thu, 10 Dec 2009 00:53:57 +0000 (16:53 -0800)]
nptl: fix old style function declerations

also fix a few shadowed local warnings

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agonptl: make build depend directly on nptl headers
Austin Foxley [Wed, 9 Dec 2009 22:51:45 +0000 (14:51 -0800)]
nptl: make build depend directly on nptl headers

gets rid of nptl_headers,nptl_arch_headers,nptl_linux_headers targets

also, clean up extra slashes in i386/sparc and unify the implementation
of nptl header generation between all archs

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agowarn about old-style crap in extra-annoyance-mode
Bernhard Reutner-Fischer [Wed, 9 Dec 2009 20:12:37 +0000 (21:12 +0100)]
warn about old-style crap in extra-annoyance-mode

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agotest_dlopen: Remove extra -lpthread from LD_FLAGS for dltest{2}
Filippo Arcidiacono [Wed, 9 Dec 2009 15:24:46 +0000 (16:24 +0100)]
test_dlopen: Remove extra -lpthread from LD_FLAGS for dltest{2}

dltest and dltest2 do not refer any symbols implemented
in pthread library, so do not explicitly link them with pthread.
It is required only for the shared objects that are loaded
via dlopen by those tests.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agotest_dlopen: Remove extra -lpthread from LD_FLAGS for dltest{2}
Filippo Arcidiacono [Wed, 9 Dec 2009 15:24:46 +0000 (16:24 +0100)]
test_dlopen: Remove extra -lpthread from LD_FLAGS for dltest{2}

dltest and dltest2 do not refer any symbols implemented
in pthread library, so do not explicitly link them with pthread.
It is required only for the shared objects that are loaded
via dlopen by those tests.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agoi386 nptl: add missing weak_alias for pthread_cond_signal
Austin Foxley [Fri, 4 Dec 2009 22:32:10 +0000 (14:32 -0800)]
i386 nptl: add missing weak_alias for pthread_cond_signal

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoldso_tls: Refetch dtv from memory if THREAD_DTV has changed
Carmelo Amoroso [Thu, 3 Dec 2009 12:33:16 +0000 (13:33 +0100)]
ldso_tls: Refetch dtv from memory if THREAD_DTV has changed

_dl_update_slotinfo might change THREAD_DTV () (if it needs to reallocate it),
but the caller (__tls_get_addr) doesn't refetch dtv from memory, it uses its
cached copy. This may crash (if dtv[GET_ADDR_MODULE] is off the cliff, or
might read uninitialized memory and return it.
Typically dtv[GET_ADDR_MODULE].pointer.val is NULL and so __tls_get_addr
returns NULL + offset_within_PT_TLS. The next time __tls_get_addr is called
for the same library it will return correct address as _dl_update_slotinfo
won't need to be called.

Signed-off-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agotest_tls: Add two new tests for tls tst-tls{16,17} taken from glibc
Carmelo Amoroso [Thu, 3 Dec 2009 12:29:53 +0000 (13:29 +0100)]
test_tls: Add two new tests for tls tst-tls{16,17} taken from glibc

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agotest_tls: Rename tst-tls16 to tst-tls-at-ctor
Carmelo Amoroso [Thu, 3 Dec 2009 12:07:54 +0000 (13:07 +0100)]
test_tls: Rename tst-tls16 to tst-tls-at-ctor

Rename tst-tls16 to tst-tls-at-ctor (including main and related
shared object) to avoid name clashing with new tests ported from
glibc.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agobuild: Move test build flags in Makefile.in
Carmelo Amoroso [Thu, 3 Dec 2009 11:21:54 +0000 (12:21 +0100)]
build: Move test build flags in Makefile.in

Move test build flags in Makefile.in
Makefile should be used only as a container for other sub Makefiles

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agosh: Add a prototype for the gcc __set_fpscr internal function
Carmelo Amoroso [Thu, 3 Dec 2009 07:06:10 +0000 (08:06 +0100)]
sh: Add a prototype for the gcc __set_fpscr internal function

The sh port uses the gcc __set_fpscr internal function, but neither gcc
nor glibc creates a prototype for it.  This leads to a bunch of random
warnings about implicit decls during the build.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agosh: Add a prototype for the gcc __set_fpscr internal function
Carmelo Amoroso [Thu, 3 Dec 2009 07:06:10 +0000 (08:06 +0100)]
sh: Add a prototype for the gcc __set_fpscr internal function

The sh port uses the gcc __set_fpscr internal function, but neither gcc
nor glibc creates a prototype for it.  This leads to a bunch of random
warnings about implicit decls during the build.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agouClibc_ctype.h: fix inverted check for susv4 macro
Austin Foxley [Tue, 1 Dec 2009 04:43:56 +0000 (20:43 -0800)]
uClibc_ctype.h: fix inverted check for susv4 macro

Was causing build failures if ctype tables were disabled and susv4 was on

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agouClibc_ctype.h: fix inverted check for susv4 macro
Austin Foxley [Tue, 1 Dec 2009 04:43:56 +0000 (20:43 -0800)]
uClibc_ctype.h: fix inverted check for susv4 macro

Was causing build failures if ctype tables were disabled and susv4 was on

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agogetaddrinfo.c: include tls.h before resolv.h
Austin Foxley [Mon, 30 Nov 2009 20:11:40 +0000 (12:11 -0800)]
getaddrinfo.c: include tls.h before resolv.h

This is needed because tls.h ends up includeing nptl/descr.h
which needs the full res_state definition. resolv.h also ends up
including tls.h, but _without_ the full res_state struct it errors.

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/.gitignore: ignore a missed nptl test binary
Austin Foxley [Mon, 30 Nov 2009 04:59:41 +0000 (20:59 -0800)]
test/.gitignore: ignore a missed nptl test binary

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/.gitignore: Ignore a few more test binaries
Austin Foxley [Mon, 30 Nov 2009 04:54:10 +0000 (20:54 -0800)]
test/.gitignore: Ignore a few more test binaries

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/.gitignore: Ignore a few more test binaries
Austin Foxley [Mon, 30 Nov 2009 04:54:10 +0000 (20:54 -0800)]
test/.gitignore: Ignore a few more test binaries

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/Rules.mak: disable -z,defs for now
Austin Foxley [Mon, 30 Nov 2009 04:48:59 +0000 (20:48 -0800)]
test/Rules.mak: disable -z,defs for now

* A bunch of the nptl tests don't compile when -z,defs is on
* also turn on -std=gnu99 for the HOSTCC (_glibc) compiles

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/nptl: rework tst-tls3 to link with -z,now
Austin Foxley [Mon, 30 Nov 2009 04:18:05 +0000 (20:18 -0800)]
test/nptl: rework tst-tls3 to link with -z,now

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/: compile fixes for nptl and tls tests
Austin Foxley [Mon, 30 Nov 2009 03:37:13 +0000 (19:37 -0800)]
test/: compile fixes for nptl and tls tests

 * Add a GLIBC_TESTS_DISABLED var because many of these tests
   need internal uClibc stuff. This disables the HOSTCC build of
   these tests
 * Fix up tls test macros for x86
 * Fix the linking of the tls tests

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/nptl: don't use c99 features if you don't need to
Austin Foxley [Mon, 30 Nov 2009 02:23:20 +0000 (18:23 -0800)]
test/nptl: don't use c99 features if you don't need to

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest: nptl and tls tests need main include dir
Austin Foxley [Mon, 30 Nov 2009 02:08:17 +0000 (18:08 -0800)]
test: nptl and tls tests need main include dir

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/dlopen: fix build for libtest.so
Austin Foxley [Mon, 30 Nov 2009 01:20:11 +0000 (17:20 -0800)]
test/dlopen: fix build for libtest.so

needs -lpthread, recent addition of -z,defs and -z,now exposed this

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/dlopen: Match the function name that libtest actually sets
Austin Foxley [Mon, 30 Nov 2009 01:02:43 +0000 (17:02 -0800)]
test/dlopen: Match the function name that libtest actually sets

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/pthread: fix build of cancellation-points test
Austin Foxley [Mon, 30 Nov 2009 01:00:38 +0000 (17:00 -0800)]
test/pthread: fix build of cancellation-points test

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/stat: fix compiling the memcmp-stat test when __USE_MISC is defined
Austin Foxley [Mon, 30 Nov 2009 00:49:11 +0000 (16:49 -0800)]
test/stat: fix compiling the memcmp-stat test when __USE_MISC is defined

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/dlopen: fix build for libtest.so
Austin Foxley [Mon, 30 Nov 2009 01:20:11 +0000 (17:20 -0800)]
test/dlopen: fix build for libtest.so

needs -lpthread, recent addition of -z,defs and -z,now exposed this

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/dlopen: Match the function name that libtest actually sets
Austin Foxley [Mon, 30 Nov 2009 01:02:43 +0000 (17:02 -0800)]
test/dlopen: Match the function name that libtest actually sets

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/pthread: fix build of cancellation-points test
Austin Foxley [Mon, 30 Nov 2009 01:00:38 +0000 (17:00 -0800)]
test/pthread: fix build of cancellation-points test

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/stat: fix compiling the memcmp-stat test when __USE_MISC is defined
Austin Foxley [Mon, 30 Nov 2009 00:49:11 +0000 (16:49 -0800)]
test/stat: fix compiling the memcmp-stat test when __USE_MISC is defined

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agogenerate nptl headers without a recursive make call
Austin Foxley [Mon, 30 Nov 2009 00:18:49 +0000 (16:18 -0800)]
generate nptl headers without a recursive make call

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agodon't use __i686 in symbol names as it seems gcc can define it
Austin Foxley [Sun, 29 Nov 2009 18:56:29 +0000 (10:56 -0800)]
don't use __i686 in symbol names as it seems gcc can define it

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoMerge remote branch 'origin/master' into nptl
Austin Foxley [Sun, 29 Nov 2009 06:00:53 +0000 (22:00 -0800)]
Merge remote branch 'origin/master' into nptl

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoPIC fixes for hardened
Timo Teräs [Fri, 27 Nov 2009 16:12:44 +0000 (16:12 +0000)]
PIC fixes for hardened

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agodefine local stack_chk_guard for nptl
Natanael Copa [Fri, 27 Nov 2009 16:12:43 +0000 (16:12 +0000)]
define local stack_chk_guard for nptl

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoldso: initialize stack_chk_guard after TLS is initialized
Natanael Copa [Fri, 27 Nov 2009 16:12:42 +0000 (16:12 +0000)]
ldso: initialize stack_chk_guard after TLS is initialized

stack_chk_guard is on thread local storage so we need to init TLS before
we can init stack_chk_guard.

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoAdd update instructions for x86_64 WRT utmp format
Bernhard Reutner-Fischer [Fri, 27 Nov 2009 09:03:24 +0000 (10:03 +0100)]
Add update instructions for x86_64 WRT utmp format

Commit 983c4d5188f8a7eb00766e3b3e89b218899a3a08 changed the utmp format
on x86_64 hosts to be 32bit compatible. Mention this fact and hint
x86_64 users that they will have to wipe their utmp file upon upgrade.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomake x86_64 struct utmp glibc-compatible
Denys Vlasenko [Thu, 26 Nov 2009 23:31:25 +0000 (00:31 +0100)]
make x86_64 struct utmp glibc-compatible

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotry to probe if stat.t_mtim.tv_nsec is available
Bernhard Reutner-Fischer [Thu, 26 Nov 2009 17:52:29 +0000 (18:52 +0100)]
try to probe if stat.t_mtim.tv_nsec is available

Do not treat tv_nsec mismatches as errors on filesystems without support for it.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agocorrect comment
Bernhard Reutner-Fischer [Thu, 26 Nov 2009 17:51:13 +0000 (18:51 +0100)]
correct comment

and disable built-in rules

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoRobustify setting silent mode
Bernhard Reutner-Fischer [Thu, 26 Nov 2009 17:50:36 +0000 (18:50 +0100)]
Robustify setting silent mode

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosync confname, environments with glibc
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:56:28 +0000 (15:56 +0100)]
sync confname, environments with glibc

Plus related synch.
Add a testcase for the sysconf variables based on the one from glibc

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoignore some more testcase binaries
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:55:47 +0000 (15:55 +0100)]
ignore some more testcase binaries

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agocall nanosleep directly
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:42:50 +0000 (15:42 +0100)]
call nanosleep directly

usleep is a SUSv3 function.
TODO: nanosleep moved from SUSv3 Timers to SUSv4 Base

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoconditional cancellation-point test of usleep
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:41:50 +0000 (15:41 +0100)]
conditional cancellation-point test of usleep

usleep is a SUSv3 function

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agopass more ld flags
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:40:35 +0000 (15:40 +0100)]
pass more ld flags

add -z defs,now

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoether_*() depend on socket or IP support
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 14:39:36 +0000 (15:39 +0100)]
ether_*() depend on socket or IP support

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoavoid warning about unused variable
Bernhard Reutner-Fischer [Wed, 25 Nov 2009 09:59:31 +0000 (10:59 +0100)]
avoid warning about unused variable

If LDSO_SEARCH_INTERP_PATH is off then ptmp wasn't used.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoin6_{pktinfo,mtuinfo}: provide type if IPV6 is on
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 19:40:41 +0000 (20:40 +0100)]
in6_{pktinfo,mtuinfo}: provide type if IPV6 is on

Disable some IPv6 header defines if IPv6 is off.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agonommu: use MAP_UNINITIALIZE for mallocs
Mike Frysinger [Tue, 24 Nov 2009 02:35:34 +0000 (21:35 -0500)]
nommu: use MAP_UNINITIALIZE for mallocs

Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use
it to get real uninitialized memory on no-mmu systems.  This avoids a lot
of normally useless overhead involved in zeroing out all of the memory
(sometimes multiple times).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agobits/mmap.h: unify ala linux asm-generic efforts
Mike Frysinger [Tue, 24 Nov 2009 01:48:50 +0000 (20:48 -0500)]
bits/mmap.h: unify ala linux asm-generic efforts

Most ports have the same exact mman bit defines, so let's unify things
like the linux kernel has with the asm-generic efforts.

A few ports are left behind as they are non-trivial to merge -- the arch
maintainers can tackle it if they care.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agofutimens: Ducument why we need manual hidden_proto
Bernhard Reutner-Fischer [Mon, 23 Nov 2009 08:43:58 +0000 (09:43 +0100)]
futimens: Ducument why we need manual hidden_proto

Also, remove unneeded __need_timespec (It cuts off a tiny bit of
work for CPP but is of course not strictly needed).

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoldso: let people disable the implicit path search
Mike Frysinger [Mon, 23 Nov 2009 04:54:40 +0000 (23:54 -0500)]
ldso: let people disable the implicit path search

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoMerge remote branch 'origin/master' into nptl_merge
Austin Foxley [Mon, 23 Nov 2009 03:30:07 +0000 (19:30 -0800)]
Merge remote branch 'origin/master' into nptl_merge

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoRevert "libc: add hidden calls to pthread cleanup funcs"
Austin Foxley [Mon, 23 Nov 2009 03:20:56 +0000 (19:20 -0800)]
Revert "libc: add hidden calls to pthread cleanup funcs"

This reverts commit e0ac4efbdb498319f03a2a95d75d061ab6c68491.

Was causing segfaults on every pthread linked executable

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agosh: Add new optimisation to the SH4 memcpy
Austin Foxley [Sun, 22 Nov 2009 20:17:38 +0000 (12:17 -0800)]
sh: Add new optimisation to the SH4 memcpy

This optimization is based on prefetching and 64bit data transfer via FPU
(only for the little endianess)

Tests shows that:

  ----------------------------------------
  Memory bandwidth    |        Gain
                      | sh4-300 | sh4-200
  ----------------------------------------
  512 bytes to 16KiB  | ~20%    | ~25%
  from 32KiB to 16MiB | ~190%   | ~5%
  ----------------------------------------

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
14 years agoMerge remote branch 'origin/master' into nptl_merge
Austin Foxley [Sun, 22 Nov 2009 19:46:31 +0000 (11:46 -0800)]
Merge remote branch 'origin/master' into nptl_merge

Conflicts:
Rules.mak
libc/misc/sysvipc/msgq.c
test/Rules.mak

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agomake tls and nptl test build
Bernhard Reutner-Fischer [Wed, 18 Nov 2009 15:56:49 +0000 (16:56 +0100)]
make tls and nptl test build

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoLook at HAVE_SHARED
Bernhard Reutner-Fischer [Wed, 18 Nov 2009 15:02:54 +0000 (16:02 +0100)]
Look at HAVE_SHARED

We do not have UCLIBC_STATIC (anymore) but !HAVE_SHARED

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoremove wait callbacks for non-cancelation funcs
Bernhard Reutner-Fischer [Fri, 13 Nov 2009 12:11:00 +0000 (13:11 +0100)]
remove wait callbacks for non-cancelation funcs

No need to install a cancellation handler, these are no cancellation
point.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoinclude string.h for memset()
Bernhard Reutner-Fischer [Thu, 12 Nov 2009 12:53:25 +0000 (13:53 +0100)]
include string.h for memset()

This avoids a warnings about implicit declaration of function 'memset'.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoMakefile: fix indentation
Bernhard Reutner-Fischer [Tue, 17 Nov 2009 19:48:43 +0000 (20:48 +0100)]
Makefile: fix indentation

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoinstall_headers.sh: make more user friendly
Mike Frysinger [Sun, 22 Nov 2009 08:37:56 +0000 (03:37 -0500)]
install_headers.sh: make more user friendly

Make it easier to run this by hand and don't abort when recursive chown
and chmod fail as these often aren't due to uClibc settings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoremove incorrect text from abspath option
Mike Frysinger [Sun, 22 Nov 2009 08:17:46 +0000 (03:17 -0500)]
remove incorrect text from abspath option

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoinstall shared libs with +x perms
Mike Frysinger [Sun, 22 Nov 2009 01:09:42 +0000 (20:09 -0500)]
install shared libs with +x perms

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agorealclean: wipe kconfig objects
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 19:30:02 +0000 (20:30 +0100)]
realclean: wipe kconfig objects

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosilence rule overriding
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 19:28:49 +0000 (20:28 +0100)]
silence rule overriding

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agofutimens: add function
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 19:05:07 +0000 (20:05 +0100)]
futimens: add function

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomake test-skeleton C89 compliant
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 18:38:53 +0000 (19:38 +0100)]
make test-skeleton C89 compliant

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoremove superfluous extra semicolons
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 09:13:16 +0000 (10:13 +0100)]
remove superfluous extra semicolons

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoppoll: get NULL from stddef.h
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 08:41:04 +0000 (09:41 +0100)]
ppoll: get NULL from stddef.h

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years ago__assert: include unistd.h for smallint
Bernhard Reutner-Fischer [Fri, 20 Nov 2009 08:37:56 +0000 (09:37 +0100)]
__assert: include unistd.h for smallint

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agofeatures.h: reorganize
Peter S. Mazinger [Sat, 17 Oct 2009 02:27:18 +0000 (04:27 +0200)]
features.h: reorganize

Reorganize so uClibc related changes are better seen when syncing with glibc.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agolimits.h: update
Peter S. Mazinger [Sat, 17 Oct 2009 02:17:57 +0000 (04:17 +0200)]
limits.h: update

Should we care about compilers not defining __LONG_LONG_MAX__?

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agohelp broken apps to detect __GLIBC__ headers
Peter S. Mazinger [Sat, 17 Oct 2009 02:16:12 +0000 (04:16 +0200)]
help broken apps to detect __GLIBC__ headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoupdate headers and disable prototypes
Peter S. Mazinger [Sat, 17 Oct 2009 02:07:01 +0000 (04:07 +0200)]
update headers and disable prototypes

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoprotocols.h: remove
Peter S. Mazinger [Sat, 17 Oct 2009 01:51:49 +0000 (03:51 +0200)]
protocols.h: remove

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosync some headers and disable unused prototypes
Peter S. Mazinger [Sat, 17 Oct 2009 01:45:53 +0000 (03:45 +0200)]
sync some headers and disable unused prototypes

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomsgrcv is of type ssize_t
Peter S. Mazinger [Sat, 17 Oct 2009 01:36:43 +0000 (03:36 +0200)]
msgrcv is of type ssize_t

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agouse __BYTE_ORDER and __*ENDIAN
Peter S. Mazinger [Sat, 17 Oct 2009 01:31:36 +0000 (03:31 +0200)]
use __BYTE_ORDER and __*ENDIAN

Those without the __ prefix are BSD specific.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoSUSv4: disable isascii, toascii, _toupper, _tolower
Bernhard Reutner-Fischer [Thu, 19 Nov 2009 22:00:32 +0000 (23:00 +0100)]
SUSv4: disable isascii, toascii, _toupper, _tolower

[__]isascii need to be defined all the time for the build.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomove __linux__ to libc-internal.h
Peter S. Mazinger [Sat, 17 Oct 2009 00:19:35 +0000 (02:19 +0200)]
move __linux__ to libc-internal.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoassert: make linenumber unsigned
Peter S. Mazinger [Sat, 17 Oct 2009 00:04:20 +0000 (02:04 +0200)]
assert: make linenumber unsigned

Move attribute_noreturn to header.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agonameser.h: sync with glibc
Peter S. Mazinger [Fri, 16 Oct 2009 23:46:10 +0000 (01:46 +0200)]
nameser.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>
14 years agoinet.h: mark inet_ntoa_r as uClibc specific
Peter S. Mazinger [Fri, 16 Oct 2009 23:40:34 +0000 (01:40 +0200)]
inet.h: mark inet_ntoa_r as uClibc specific

Ddisable some prototypes of unimplemented funcs.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomove extend_alloca macro to alloca.h
Peter S. Mazinger [Fri, 16 Oct 2009 23:14:16 +0000 (01:14 +0200)]
move extend_alloca macro to alloca.h

guard it by _LIBC. __MAX_ALLOCA_CUTOFF is not needed on target either

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoa.out.h: why was this needed?
Peter S. Mazinger [Fri, 16 Oct 2009 23:10:38 +0000 (01:10 +0200)]
a.out.h: why was this needed?

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>