OSDN Git Service

uclinux-h8/uClibc.git
14 years agoremove wrong default for choice
Bernhard Reutner-Fischer [Wed, 28 Oct 2009 19:49:18 +0000 (20:49 +0100)]
remove wrong default for choice

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosupport selecting which locales to build
Bernhard Reutner-Fischer [Wed, 28 Oct 2009 19:12:54 +0000 (20:12 +0100)]
support selecting which locales to build

Introduce UCLIBC_BUILD_MINIMAL_LOCALES and if selected
build only those locales.

Based on a patch by Bernhard Reutner-Fischer.

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoremember some TODOs for 0.9.31
Bernhard Reutner-Fischer [Fri, 23 Oct 2009 11:36:55 +0000 (13:36 +0200)]
remember some TODOs for 0.9.31

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agodisable _POSIX_SPAWN define
Mike Frysinger [Thu, 22 Oct 2009 13:01:03 +0000 (09:01 -0400)]
disable _POSIX_SPAWN define

We don't provide spawn.h let alone any other spawn funcs/types, so don't
set up the _POSIX_SPAWN define that some packages (like vlc) check.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agobuild with -fmerge-all-constants
Mike Frysinger [Thu, 22 Oct 2009 05:17:46 +0000 (01:17 -0400)]
build with -fmerge-all-constants

Glibc is already using this flag and it gives us a slight code shrink in
a few functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agotest/plt: add a script to find PLT usage
Mike Frysinger [Thu, 22 Oct 2009 05:12:47 +0000 (01:12 -0400)]
test/plt: add a script to find PLT usage

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agolibc: add hidden calls to pthread cleanup funcs
Mike Frysinger [Thu, 22 Oct 2009 05:05:28 +0000 (01:05 -0400)]
libc: add hidden calls to pthread cleanup funcs

A lot of libc code calls the pthread cleanup funcs implicitly (for stdio)
which currently goes through the PLT.  Since we already have forwarding
symbols for these funcs, it's safe to declare the internal libc usage
hidden as a loaded libpthread will have the real symbols found.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoregex: call memcpy() ourselves
Mike Frysinger [Thu, 22 Oct 2009 05:04:07 +0000 (01:04 -0400)]
regex: call memcpy() ourselves

Call the hidden memcpy() ourselves otherwise gcc will emit a call to the
public memcpy() which goes through the PLT.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosysctl: avoid inline initialization
Mike Frysinger [Thu, 22 Oct 2009 04:43:19 +0000 (00:43 -0400)]
sysctl: avoid inline initialization

Assign each field one by one rather than stack initialization as gcc will
call memset() to zero out the rest of the structure -- which we don't care
about as the field is unused and not seen outside of the libc.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoinet_ntop4: avoid inline initialization
Mike Frysinger [Thu, 22 Oct 2009 04:41:29 +0000 (00:41 -0400)]
inet_ntop4: avoid inline initialization

We only need to set the first byte to 0, but gcc likes to zero out the
rest of the string with memset() when using this initialization style.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosparc: use fputs to write to stderr
Mike Frysinger [Thu, 22 Oct 2009 04:39:59 +0000 (00:39 -0400)]
sparc: use fputs to write to stderr

This also has the advantage of fputs() having a hidden alias while
puts does not.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosparc: use HIDDEN_JUMPTARGET for errno
Mike Frysinger [Thu, 22 Oct 2009 04:39:44 +0000 (00:39 -0400)]
sparc: use HIDDEN_JUMPTARGET for errno

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoremove useless .gitignore
Austin Foxley [Tue, 20 Oct 2009 20:19:35 +0000 (13:19 -0700)]
remove useless .gitignore

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoadd .gitignore for test/ and extra/
Austin Foxley [Sat, 17 Oct 2009 19:00:36 +0000 (12:00 -0700)]
add .gitignore for test/ and extra/

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agotest/dlopen: use pthread_once directly
Austin Foxley [Sat, 17 Oct 2009 18:54:57 +0000 (11:54 -0700)]
test/dlopen: use pthread_once directly

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agolinuxthreads: check TLS_DTV_AT_TP define correctly
Austin Foxley [Sat, 17 Oct 2009 18:41:26 +0000 (11:41 -0700)]
linuxthreads: check TLS_DTV_AT_TP define correctly

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agomktemp does not depend on floats
Austin Foxley [Sat, 17 Oct 2009 18:15:57 +0000 (11:15 -0700)]
mktemp does not depend on floats

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agogitignore: ignore install_dir/
Austin Foxley [Sat, 17 Oct 2009 18:01:45 +0000 (11:01 -0700)]
gitignore: ignore install_dir/

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoMakerules: add a do_sed command
Austin Foxley [Sat, 17 Oct 2009 17:59:55 +0000 (10:59 -0700)]
Makerules: add a do_sed command

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoldso: fixup missed variable rename ( tls_tpnt -> tpntp )
Austin Foxley [Fri, 16 Oct 2009 18:50:51 +0000 (11:50 -0700)]
ldso: fixup missed variable rename ( tls_tpnt -> tpntp )

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoremove readelf from helptext
Bernhard Reutner-Fischer [Fri, 16 Oct 2009 09:38:53 +0000 (11:38 +0200)]
remove readelf from helptext

readelf was removed

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomalloc: handle size overflows in realloc()
Mike Frysinger [Thu, 15 Oct 2009 23:47:12 +0000 (19:47 -0400)]
malloc: handle size overflows in realloc()

The malloc() code checks the incoming size to make sure the header
adjustment doesn't cause overflow in the size storage.  Add the same
check to realloc() to catch stupid stuff like realloc(..., -1).

Reported-by: James Coleman <james.coleman@ubicom.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosparc qops: unify & shrink
Mike Frysinger [Thu, 15 Oct 2009 23:34:04 +0000 (19:34 -0400)]
sparc qops: unify & shrink

We don't really need to know the exact symbol that caused a failure as
long as we know where to start looking.  So unify the duplicate code
between all funcs and between the sparc variants.  This gives us a nice
code shrink of ~95%.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: drop duplicated/unused defines
Mike Frysinger [Thu, 15 Oct 2009 23:27:17 +0000 (19:27 -0400)]
ldso: drop duplicated/unused defines

We already include bits/fcntl.h for some of these defines, and most of
the bits/stat.h defines are unused.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: unify and cleanup _dl_mmap code
Mike Frysinger [Thu, 15 Oct 2009 23:15:41 +0000 (19:15 -0400)]
ldso: unify and cleanup _dl_mmap code

The interface should be straight forward now and the same for everyone.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoi386: use common INTERNAL_SYSCALL_ERROR_P
Mike Frysinger [Thu, 15 Oct 2009 22:12:51 +0000 (18:12 -0400)]
i386: use common INTERNAL_SYSCALL_ERROR_P

The common define has the same behavior, just formatted differently.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: define MAP_FAILED for everyone
Mike Frysinger [Thu, 15 Oct 2009 21:35:33 +0000 (17:35 -0400)]
ldso: define MAP_FAILED for everyone

This fixes build errors where common code has started using MAP_FAILED.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: simplify handling of extra _dl_lookup_hash() arg
Mike Frysinger [Thu, 15 Oct 2009 21:14:40 +0000 (17:14 -0400)]
ldso: simplify handling of extra _dl_lookup_hash() arg

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: clean up breakage in tls merge
Mike Frysinger [Thu, 15 Oct 2009 20:15:59 +0000 (16:15 -0400)]
ldso: clean up breakage in tls merge

The TLS merge 534661b91c9849 introduced multiple style problems as well as
random breakage:
- missing _dl_free
- incomplete parametrization of _dl_lookup_hash
- restore FDPIC handling in _dl_lookup_hash

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: fixup all the rest of the calls to _dl_find_hash
Austin Foxley [Thu, 15 Oct 2009 00:21:46 +0000 (17:21 -0700)]
ldso: fixup all the rest of the calls to _dl_find_hash

With TLS _dl_find_hash grew an extra param.
These archs don't have TLS reloc support yet, but they do need to
compile without it.

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoFix SH bits/kernel_types.h for new kernel headers.
Joseph Myers [Wed, 14 Oct 2009 14:13:34 +0000 (14:13 +0000)]
Fix SH bits/kernel_types.h for new kernel headers.

Recent SH kernel headers merge 32-bit and 64-bit headers, changing the
include guards on asm/posix_types.h in the process; update uClibc code
depending on those include guards.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
14 years agocheck stat("/etc/resolv.conf") for errors
Denys Vlasenko [Wed, 14 Oct 2009 12:09:29 +0000 (14:09 +0200)]
check stat("/etc/resolv.conf") for errors

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofix cosmetic typo
Bernhard Reutner-Fischer [Wed, 14 Oct 2009 10:53:59 +0000 (12:53 +0200)]
fix cosmetic typo

s/dependancies/dependencies/g

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agolibc/inet/resolv.c: reread resolv.conf if its mtime was changed
Bernhard Reutner-Fischer [Tue, 13 Oct 2009 20:34:15 +0000 (22:34 +0200)]
libc/inet/resolv.c: reread resolv.conf if its mtime was changed

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodrop __BCC__ cruft from string code
Mike Frysinger [Sat, 10 Oct 2009 16:44:02 +0000 (12:44 -0400)]
drop __BCC__ cruft from string code

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agocheck_ld some more flags
Bernhard Reutner-Fischer [Fri, 9 Oct 2009 16:10:50 +0000 (18:10 +0200)]
check_ld some more flags

  gold does not currently implement these.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoSUSV4: remove utime.h
Bernhard Reutner-Fischer [Fri, 9 Oct 2009 15:48:13 +0000 (17:48 +0200)]
SUSV4: remove utime.h

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoadd and use qstrip
Bernhard Reutner-Fischer [Thu, 8 Oct 2009 21:05:11 +0000 (23:05 +0200)]
add and use qstrip

  qstrip substitites quotes and strips the result.
  Avoiding single-quotes helps vim's poor syntax highlighting.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoutime() is obsolescent in SUSv4
Bernhard Reutner-Fischer [Wed, 7 Oct 2009 17:42:09 +0000 (19:42 +0200)]
utime() is obsolescent in SUSv4

  LEGACY was removed for utimes() in SUSv4

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoftw() is obsolescent in SUSv4
Bernhard Reutner-Fischer [Fri, 18 Sep 2009 14:18:25 +0000 (16:18 +0200)]
ftw() is obsolescent in SUSv4

  Apps should switch to nftw()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years ago_toupper, _tolower depend on SUSv4
Bernhard Reutner-Fischer [Fri, 18 Sep 2009 14:17:51 +0000 (16:17 +0200)]
_toupper, _tolower depend on SUSv4

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agolink-time warning for obsolescent/removed network funcs
Bernhard Reutner-Fischer [Tue, 25 Aug 2009 13:29:07 +0000 (15:29 +0200)]
link-time warning for obsolescent/removed network funcs

Signed-off-by: aldot <rep.dot.nop@gmail.com>
14 years agoFix building arm EABI
Bernhard Reutner-Fischer [Thu, 8 Oct 2009 14:48:16 +0000 (16:48 +0200)]
Fix building arm EABI

  The syscall() impl on aeabi comes from syscall-eabi.S thus we do not
  need the generic syscall() impl.

  Fixes:
    AS libc/sysdeps/linux/arm/syscall-eabi.os
    CC libc/sysdeps/linux/common/syscall.os
libc/libc_so.a(syscall.os): In function `syscall':
syscall.c:(.text+0x0): multiple definition of `syscall'
libc/libc_so.a(syscall-eabi.os):(.text+0x0): first defined here

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoresolv/crypt: convert to foo-y kbuild style
Mike Frysinger [Thu, 8 Oct 2009 03:01:44 +0000 (23:01 -0400)]
resolv/crypt: convert to foo-y kbuild style

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: pull in missing bits/fcntl.h header for O_CLOEXEC
Mike Frysinger [Thu, 8 Oct 2009 02:53:19 +0000 (22:53 -0400)]
ldso: pull in missing bits/fcntl.h header for O_CLOEXEC

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: use O_CLOEXEC for cache file
Mike Frysinger [Thu, 8 Oct 2009 02:53:19 +0000 (22:53 -0400)]
ldso: use O_CLOEXEC for cache file

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoclean up O_CLOEXEC handling
Mike Frysinger [Thu, 8 Oct 2009 02:51:55 +0000 (22:51 -0400)]
clean up O_CLOEXEC handling

Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h
headers, and import __ASSUME_O_CLOEXEC from glibc.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agofcntl.h: drop unused/dead O_STREAMING
Mike Frysinger [Thu, 8 Oct 2009 02:46:10 +0000 (22:46 -0400)]
fcntl.h: drop unused/dead O_STREAMING

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoldso: use MAP_FAILED with ld.so.cache
Mike Frysinger [Thu, 8 Oct 2009 02:24:22 +0000 (22:24 -0400)]
ldso: use MAP_FAILED with ld.so.cache

Rather than use our own custom casted -1 value, just use the MAP_FAILED
that common code already sets up for us for mmap().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agofix coding style
Bernhard Reutner-Fischer [Tue, 6 Oct 2009 17:04:42 +0000 (19:04 +0200)]
fix coding style

  TODO: use likely/unlikely

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agocommentary typo fix
Bernhard Reutner-Fischer [Tue, 6 Oct 2009 16:51:08 +0000 (18:51 +0200)]
commentary typo fix

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agotrim whitespace
Bernhard Reutner-Fischer [Tue, 6 Oct 2009 16:50:19 +0000 (18:50 +0200)]
trim whitespace

  and wrap superlong line.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agowhitespace cleanup
Bernhard Reutner-Fischer [Tue, 6 Oct 2009 10:59:17 +0000 (12:59 +0200)]
whitespace cleanup

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosparc: add stubs for more of the _Q* ops
Austin Foxley [Mon, 5 Oct 2009 18:01:30 +0000 (11:01 -0700)]
sparc: add stubs for more of the _Q* ops

Thanks to Jason Woodward <jason.woodward@timesys.com>

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agodescriptive error message
Bernhard Reutner-Fischer [Mon, 5 Oct 2009 11:04:12 +0000 (13:04 +0200)]
descriptive error message

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agomips: fix typo in elfinterp.c
Austin Foxley [Mon, 5 Oct 2009 00:48:54 +0000 (17:48 -0700)]
mips: fix typo in elfinterp.c

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoConfig.in: enable TLS config option only for nptl
Austin Foxley [Sat, 26 Sep 2009 16:34:19 +0000 (09:34 -0700)]
Config.in: enable TLS config option only for nptl

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoerrno.c: add tls versions of errno and h_errno
Austin Foxley [Thu, 24 Sep 2009 06:43:58 +0000 (23:43 -0700)]
errno.c: add tls versions of errno and h_errno

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agodl-support.c: add tls support
Austin Foxley [Sat, 19 Sep 2009 17:11:14 +0000 (10:11 -0700)]
dl-support.c: add tls support

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoresolv.c: add support for per thread res_state
Austin Foxley [Sat, 19 Sep 2009 17:09:39 +0000 (10:09 -0700)]
resolv.c: add support for per thread res_state

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoldso/: tls support for dynamic linker
Austin Foxley [Sat, 19 Sep 2009 17:04:05 +0000 (10:04 -0700)]
ldso/: tls support for dynamic linker

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoinclude/: add tls errno and res_state
Austin Foxley [Sat, 19 Sep 2009 16:54:20 +0000 (09:54 -0700)]
include/: add tls errno and res_state

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agomips: do not save variables in "hi" or "lo" across system calls
Daniel Jacobowitz [Fri, 25 Sep 2009 22:48:39 +0000 (18:48 -0400)]
mips: do not save variables in "hi" or "lo" across system calls

The kernel does not save these registers across system calls.  GCC 4.4
has gotten more aggressive about using them for temporary variables, so
this shows up as intermittent crashes if you use a recent compiler.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosparc specific bits/socket.h
Austin Foxley [Fri, 25 Sep 2009 19:55:30 +0000 (12:55 -0700)]
sparc specific bits/socket.h

use socketcall for sparc32 since it does not have
the individual socket syscalls

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agodoc/: typo fix
Austin Foxley [Wed, 23 Sep 2009 14:24:20 +0000 (07:24 -0700)]
doc/: typo fix

noted by Carlo Zinato <c.zinato@viscount.it>

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agoadd timerfd syscall and header
Stephan Raue [Tue, 22 Sep 2009 01:35:40 +0000 (18:35 -0700)]
add timerfd syscall and header

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Signed-off-by: Stephan Raue <mailinglists@openelec.tv>
14 years agosparc sigaction.c: fix the noted bugs by syncing up with glibc
Austin Foxley [Mon, 21 Sep 2009 16:16:52 +0000 (09:16 -0700)]
sparc sigaction.c: fix the noted bugs by syncing up with glibc

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 years agosigpause: remove libc_hidden_proto/def
Denys Vlasenko [Sat, 19 Sep 2009 02:00:48 +0000 (04:00 +0200)]
sigpause: remove libc_hidden_proto/def

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosigwait: remove __sigwait and __GI_sigwait symbols - they are unused
Denys Vlasenko [Sat, 19 Sep 2009 01:41:14 +0000 (03:41 +0200)]
sigwait: remove __sigwait and __GI_sigwait symbols - they are unused

sigwait is not called from any uclibc function, so "hidden symbol"
trick is not needed on it. __sigwait also is never used,
and it's not clear why it even existed.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoraise: remove unused hidden weak symbol __raise
Denys Vlasenko [Sat, 19 Sep 2009 00:51:20 +0000 (02:51 +0200)]
raise: remove unused hidden weak symbol __raise

It is not used by anybody, otherwise users of dynamically linked uclibc
would notice - it is not exported from libuClibc-x.x.x.so

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibc/misc/wctype/_wctype.c: make it more readable. no code changes
Denys Vlasenko [Sat, 19 Sep 2009 00:14:12 +0000 (02:14 +0200)]
libc/misc/wctype/_wctype.c: make it more readable. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoremove a few more empty #if/#endif pairs
Denys Vlasenko [Sat, 19 Sep 2009 00:09:48 +0000 (02:09 +0200)]
remove a few more empty #if/#endif pairs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoconvert // comments to /**/; remove empty #if/#endif pairs. no code changes
Denys Vlasenko [Fri, 18 Sep 2009 21:07:26 +0000 (23:07 +0200)]
convert // comments to /**/; remove empty #if/#endif pairs. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotrim Experimentally off and uncommented hidden
Bernhard Reutner-Fischer [Fri, 18 Sep 2009 18:57:40 +0000 (20:57 +0200)]
trim Experimentally off and uncommented hidden

  sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *)
  sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *)
  should be a nop

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agofix make {,install_}{,host}utils
Bernhard Reutner-Fischer [Fri, 18 Sep 2009 14:07:31 +0000 (16:07 +0200)]
fix make {,install_}{,host}utils

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agodocument ARCH=
Bernhard Reutner-Fischer [Fri, 18 Sep 2009 13:45:50 +0000 (15:45 +0200)]
document ARCH=

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoalways define float_t as float
Bernhard Reutner-Fischer [Thu, 17 Sep 2009 08:34:22 +0000 (10:34 +0200)]
always define float_t as float

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoNo need for a libresolv stub
Bernhard Reutner-Fischer [Thu, 17 Sep 2009 07:29:59 +0000 (09:29 +0200)]
No need for a libresolv stub

  libresolv is just a stub anyway, default to not building it.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agohandle make ARCH= config
Bernhard Reutner-Fischer [Wed, 16 Sep 2009 08:00:56 +0000 (10:00 +0200)]
handle make ARCH= config

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosys/mount.h: sync with latest glibc
Mike Frysinger [Tue, 15 Sep 2009 22:07:29 +0000 (18:07 -0400)]
sys/mount.h: sync with latest glibc

Newer glibc adds a few more MNT_* flags, so import them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosh/user.h: clean up conflicts from kernel user.h
Andrew Stubbs [Tue, 15 Sep 2009 22:02:48 +0000 (18:02 -0400)]
sh/user.h: clean up conflicts from kernel user.h

This patch makes sufficient modifications to the SH sys/user.h to be
able to build and run gdbserver with Linux kernel 2.6.30.

The problem is that both the kernel and library headers define the same
symbols, thus making it impossible in include both headers. The patch
undefines the kernel symbols in favour of the library symbols.

Signed-off-by: Andrew Stubbs <ams@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agodaemon: fix up INTERNAL_SYSCALL() usage
Mike Frysinger [Thu, 13 Aug 2009 11:49:07 +0000 (07:49 -0400)]
daemon: fix up INTERNAL_SYSCALL() usage

Make sure we declare the error properly in case a port uses it, and fix the
invocation of exit().  Since clone() will be returning a pid, assume that
the value will not have the MSB set (negative) to simplify the error test a
bit more.  If gcc supports it, force this function to always be heavily
optimized in a bid to avoid stack usage as much as possible.

Signed-off-by: James Coleman <james.coleman@ubicom.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agosetup attribute_optimize which comes with gcc-4.4+
Mike Frysinger [Thu, 13 Aug 2009 11:48:55 +0000 (07:48 -0400)]
setup attribute_optimize which comes with gcc-4.4+

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoRevert "default ?conf to native arch"
Bernhard Reutner-Fischer [Mon, 14 Sep 2009 14:00:24 +0000 (16:00 +0200)]
Revert "default ?conf to native arch"

This reverts commit 6625518cd6894338937a74ca6b9187b7b8167b03.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agosparc/sigaction.c: note possible bugs by comments. style fixes
Denys Vlasenko [Tue, 8 Sep 2009 23:34:30 +0000 (01:34 +0200)]
sparc/sigaction.c: note possible bugs by comments. style fixes

no code is actually changed

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agostrsignal.c: whitespace fixes, no code changes (verified with objdump)
Denys Vlasenko [Tue, 8 Sep 2009 22:38:41 +0000 (00:38 +0200)]
strsignal.c: whitespace fixes, no code changes (verified with objdump)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotime.c: style cleanup. no code changes (verified with objdump)
Denys Vlasenko [Tue, 8 Sep 2009 20:30:22 +0000 (22:30 +0200)]
time.c: style cleanup. no code changes (verified with objdump)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosimpler and shorter read_TZ_file() helper
Denys Vlasenko [Tue, 8 Sep 2009 20:03:51 +0000 (22:03 +0200)]
simpler and shorter read_TZ_file() helper

    text           data     bss     dec     hex filename
-   1109              8      76    1193     4a9 libc/misc/time/tzset.o
+   1095              8      76    1179     49b libc/misc/time/tzset.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodocs/defines.txt: add a note about possibly obsolete __LDBL_COMPAT
Denys Vlasenko [Sun, 6 Sep 2009 19:58:17 +0000 (21:58 +0200)]
docs/defines.txt: add a note about possibly obsolete __LDBL_COMPAT

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowordexp.c: cleanup - remove old hidden_proto's; remove unused parameter
Denys Vlasenko [Sun, 6 Sep 2009 19:51:10 +0000 (21:51 +0200)]
wordexp.c: cleanup - remove old hidden_proto's; remove unused parameter

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowordexp.c: fix a bug where we might close stdout
Denys Vlasenko [Sun, 6 Sep 2009 19:48:16 +0000 (21:48 +0200)]
wordexp.c: fix a bug where we might close stdout

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofstatat: fix up behavior on 32/64 bit hosts
Mike Frysinger [Sun, 6 Sep 2009 16:12:12 +0000 (12:12 -0400)]
fstatat: fix up behavior on 32/64 bit hosts

The fstatat() syscall is a little funky in that it sometimes changes name
between 32 and 64 bit hosts, but it should always operate on a 64bit stat
structure.  So for the fstatat() function, make sure we convert it from a
64bit kstat to a 32bit stat.

Along these lines, we need to restore the __xstat32_conv() function.

Reported-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoxstatconv: drop useless hidden code
Mike Frysinger [Sun, 6 Sep 2009 15:15:29 +0000 (11:15 -0400)]
xstatconv: drop useless hidden code

The xstatconv.h header already sets up hidden prototypes for us, so no
need to duplicate the code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoRevert "syscall.c: Use common syscall.c for ARM"
Khem Raj [Sun, 6 Sep 2009 08:02:02 +0000 (01:02 -0700)]
Revert "syscall.c: Use common syscall.c for ARM"

This reverts commit b1913a876059949e6c309bafade55e9425ef33fb.
OABI is still a requirement. So we override the common syscall
implementation specifically for arm port.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 years agomd5 passwords: reduce static usage
Denys Vlasenko [Sun, 6 Sep 2009 02:34:07 +0000 (04:34 +0200)]
md5 passwords: reduce static usage

    text           data     bss     dec     hex filename
-   1875              0     120    1995     7cb libcrypt/md5.o
+   1855              0      35    1890     762 libcrypt/md5.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorexec.c: style fixes, no code chages (verified with objdump)
Denys Vlasenko [Sat, 5 Sep 2009 23:03:10 +0000 (01:03 +0200)]
rexec.c: style fixes, no code chages (verified with objdump)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorexec.c: small code shrink
Denys Vlasenko [Sat, 5 Sep 2009 22:54:06 +0000 (00:54 +0200)]
rexec.c: small code shrink

    text           data     bss     dec     hex filename
-   1223              0       0    1223     4c7 libc/inet/rpc/rexec.o
+   1214              0       0    2239     8bf libc/inet/rpc/rexec.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocomment out "int rexecoptions"; make "char ahostbuf[]" static (was hidden)
Denys Vlasenko [Sat, 5 Sep 2009 22:52:35 +0000 (00:52 +0200)]
comment out "int rexecoptions"; make "char ahostbuf[]" static (was hidden)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodo not save/restore errno around free() calls
Denys Vlasenko [Sat, 5 Sep 2009 21:37:40 +0000 (23:37 +0200)]
do not save/restore errno around free() calls

In any non-buggy program free() does not fail.
And when it fails in a buggy program, the failure
is usually fatal (heap corruption and segfault).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodo not pass 3rd param to open() which do not create files
Denys Vlasenko [Sat, 5 Sep 2009 21:35:09 +0000 (23:35 +0200)]
do not pass 3rd param to open() which do not create files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>