OSDN Git Service

uclinux-h8/uClibc.git
11 years agocancel.h: add generic file to ease cancellation support
Peter S. Mazinger [Thu, 21 Apr 2011 19:19:39 +0000 (21:19 +0200)]
cancel.h: add generic file to ease cancellation support

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowait4.c: provide hidden __wait4_nocancel independent of any guards
Peter S. Mazinger [Sun, 17 Apr 2011 13:45:46 +0000 (15:45 +0200)]
wait4.c: provide hidden __wait4_nocancel independent of any guards

Correct wait4 guard (it is only __USE_BSD)
wait3, system: use __wait4_nocancel

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agovfork: make all archs consistent
Peter S. Mazinger [Sat, 16 Apr 2011 13:40:50 +0000 (15:40 +0200)]
vfork: make all archs consistent

__vfork is hidden.
__GI_vfork is strong (not weak as it was).
vfork is weak.
e1 can use the generic version.

Note: libc_hidden_def(x) has different meaning in .c and .S files.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoutime[s]: avoid circular dependency
Peter S. Mazinger [Sat, 16 Apr 2011 12:24:38 +0000 (14:24 +0200)]
utime[s]: avoid circular dependency

utime.c: fix a cast, tv_sec is of type time_t
Add stub for utimes.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoustat.c: always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 12:19:52 +0000 (14:19 +0200)]
ustat.c: always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouname.c,unlink.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 12:19:10 +0000 (14:19 +0200)]
uname.c,unlink.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoumount: make umount2 depend on UCLIBC_LINUX_SPECIFIC
Peter S. Mazinger [Sat, 16 Apr 2011 11:51:08 +0000 (13:51 +0200)]
umount: make umount2 depend on UCLIBC_LINUX_SPECIFIC

Add hidden umount2 to be used in umount eventually.
Rework umount to either use directly umount2 syscall or function.

docs say, that mount and umount are also Linux specific

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomount.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 11:49:54 +0000 (13:49 +0200)]
mount.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotimes.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 11:37:56 +0000 (13:37 +0200)]
times.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoumask.c: umask always succeeds, use _syscall_noerr1
Peter S. Mazinger [Sat, 16 Apr 2011 11:24:16 +0000 (13:24 +0200)]
umask.c: umask always succeeds, use _syscall_noerr1

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotime.c: move included header for fallback case
Peter S. Mazinger [Sat, 16 Apr 2011 11:10:11 +0000 (13:10 +0200)]
time.c: move included header for fallback case

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogettimeofday.c: use the same type as in header
Peter S. Mazinger [Sat, 16 Apr 2011 11:05:33 +0000 (13:05 +0200)]
gettimeofday.c: use the same type as in header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoprovide sysinfo stub
Peter S. Mazinger [Sat, 16 Apr 2011 11:00:31 +0000 (13:00 +0200)]
provide sysinfo stub

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosyscalls.h: remove unused headers
Peter S. Mazinger [Sat, 16 Apr 2011 10:56:41 +0000 (12:56 +0200)]
syscalls.h: remove unused headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonanosleep.c, fsync.c: do not inline syscall, it is used twice
Peter S. Mazinger [Sat, 16 Apr 2011 10:50:56 +0000 (12:50 +0200)]
nanosleep.c, fsync.c: do not inline syscall, it is used twice

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agobrk.c: remove libc_hidden_proto, always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 10:50:24 +0000 (12:50 +0200)]
brk.c: remove libc_hidden_proto, always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosigsuspend.c: make build fail, if rt_sigsuspend is not available and NPTL is defined
Peter S. Mazinger [Sat, 16 Apr 2011 10:42:50 +0000 (12:42 +0200)]
sigsuspend.c: make build fail, if rt_sigsuspend is not available and NPTL is defined

Rework a bit for less code.
always_inline syscall used only once, do not inline syscall used twice.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosymlink.c: Compile only if syscall is available
Peter S. Mazinger [Sat, 16 Apr 2011 10:17:41 +0000 (12:17 +0200)]
symlink.c: Compile only if syscall is available

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoupdate acct.h
Peter S. Mazinger [Sat, 16 Apr 2011 10:14:57 +0000 (12:14 +0200)]
update acct.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosync.c: simplify code
Peter S. Mazinger [Sat, 16 Apr 2011 10:09:06 +0000 (12:09 +0200)]
sync.c: simplify code

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoprovide stime and settimeofday functions if at least one of the syscalls is available
Peter S. Mazinger [Sat, 16 Apr 2011 09:55:10 +0000 (11:55 +0200)]
provide stime and settimeofday functions if at least one of the syscalls is available

Add hidden stime for possible use in settimeofday.
Add stubs for both functions if none of the syscalls is present.
Avoid circular dependency.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetuid.c: always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 09:54:48 +0000 (11:54 +0200)]
setuid.c: always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetsid.c: whitespace only
Peter S. Mazinger [Sat, 16 Apr 2011 09:50:17 +0000 (11:50 +0200)]
setsid.c: whitespace only

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetpgrp.c: remove unneeded header
Peter S. Mazinger [Sat, 16 Apr 2011 09:49:25 +0000 (11:49 +0200)]
setpgrp.c: remove unneeded header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetgroups.c: move around some headers, always_inline syscall
Peter S. Mazinger [Sat, 16 Apr 2011 00:33:16 +0000 (02:33 +0200)]
setgroups.c: move around some headers, always_inline syscall

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopause.c: no need for __UCLIBC_HIDE_DEPRECATED__, the code does not use old functions
Peter S. Mazinger [Sat, 16 Apr 2011 00:25:53 +0000 (02:25 +0200)]
pause.c: no need for __UCLIBC_HIDE_DEPRECATED__, the code does not use old functions

Remove syscall.h as well, not needed anymore.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocorrect sendfile for 32/64 bit archs
Peter S. Mazinger [Sat, 16 Apr 2011 00:14:24 +0000 (02:14 +0200)]
correct sendfile for 32/64 bit archs

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoprctl.c: no need to include stdarg.h and extern
Peter S. Mazinger [Sat, 16 Apr 2011 00:07:22 +0000 (02:07 +0200)]
prctl.c: no need to include stdarg.h and extern

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosched_getaffinity.c: mark syscall as __always_inline
Peter S. Mazinger [Sat, 16 Apr 2011 00:06:39 +0000 (02:06 +0200)]
sched_getaffinity.c: mark syscall as __always_inline

Reorganize a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosched_setaffinity.c: make use of the syscall
Peter S. Mazinger [Sat, 16 Apr 2011 00:04:54 +0000 (02:04 +0200)]
sched_setaffinity.c: make use of the syscall

Fix arg type (const missing).
Reorganize a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agorename.c: simplify code, include only necessary headers
Peter S. Mazinger [Fri, 15 Apr 2011 23:52:51 +0000 (01:52 +0200)]
rename.c: simplify code, include only necessary headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopivot_root.c: move prototype into guard
Peter S. Mazinger [Fri, 15 Apr 2011 23:46:36 +0000 (01:46 +0200)]
pivot_root.c: move prototype into guard

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopoll.c: do not inline syscall
Peter S. Mazinger [Fri, 15 Apr 2011 23:45:33 +0000 (01:45 +0200)]
poll.c: do not inline syscall

While there, remove libc_hidden_protos

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoppoll: no need for hidden version
Peter S. Mazinger [Fri, 15 Apr 2011 23:44:12 +0000 (01:44 +0200)]
ppoll: no need for hidden version

Guard as GNU extension.
Reorganize a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agono need for hidden __sigpause, use an internal static function
Peter S. Mazinger [Fri, 15 Apr 2011 23:24:40 +0000 (01:24 +0200)]
no need for hidden __sigpause, use an internal static function

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoReorder includes and include only what is necessary
Peter S. Mazinger [Fri, 15 Apr 2011 23:20:21 +0000 (01:20 +0200)]
Reorder includes and include only what is necessary

Use param.h instead of MIN.
Use stddef.h instead of offsetof.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago*64.[cS]: use _lfs_64.h instead of features.h and remove LFS guard
Peter S. Mazinger [Fri, 15 Apr 2011 23:07:23 +0000 (01:07 +0200)]
*64.[cS]: use _lfs_64.h instead of features.h and remove LFS guard

_lfs_64.h makes the compile fail, if LFS is not enabled, no need for the guard.
Reorganize to include only the minimal necessary headers.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoopenat*: use a static function with the different type and strong_alias_untyped
Peter S. Mazinger [Fri, 15 Apr 2011 23:04:29 +0000 (01:04 +0200)]
openat*: use a static function with the different type and strong_alias_untyped

No need for hidden openat64
_lfs_64.h does not allow to compile *64.c if LFS is not enabled, remove guard

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agollseek.c: use off64_t instead of loff_t as in header
Peter S. Mazinger [Fri, 15 Apr 2011 22:41:41 +0000 (00:41 +0200)]
llseek.c: use off64_t instead of loff_t as in header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agommap64.c: use void * as in header, disable code that can't happen
Peter S. Mazinger [Fri, 15 Apr 2011 21:20:05 +0000 (23:20 +0200)]
mmap64.c: use void * as in header, disable code that can't happen

Reorganize a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoavoid circular dependency in lseek and llseek, providing a stub lseek
Peter S. Mazinger [Fri, 15 Apr 2011 21:06:40 +0000 (23:06 +0200)]
avoid circular dependency in lseek and llseek, providing a stub lseek

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetopt.h: cleanup header, remove anything already in cdefs.h
Peter S. Mazinger [Fri, 15 Apr 2011 19:18:13 +0000 (21:18 +0200)]
getopt.h: cleanup header, remove anything already in cdefs.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_stdio.c: pthread.h was already included by _stdio.h
Peter S. Mazinger [Fri, 15 Apr 2011 18:19:55 +0000 (20:19 +0200)]
_stdio.c: pthread.h was already included by _stdio.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agohandle the type mismatch of ftell[o] and fseek[o] if long int != off_t
Peter S. Mazinger [Fri, 15 Apr 2011 18:16:10 +0000 (20:16 +0200)]
handle the type mismatch of ftell[o] and fseek[o] if long int != off_t

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosignal: cleanup, include only headers that are needed
Peter S. Mazinger [Fri, 15 Apr 2011 17:33:47 +0000 (19:33 +0200)]
signal: cleanup, include only headers that are needed

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd simplified __sigemptyset for internal use
Peter S. Mazinger [Fri, 15 Apr 2011 15:49:47 +0000 (17:49 +0200)]
add simplified __sigemptyset for internal use

Use __sigemptyset instead of sigemptyset.
Remove hidden sigemptyset.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoresolv.c: shrink code a bit in getnameinfo.
Peter S. Mazinger [Thu, 14 Apr 2011 23:24:50 +0000 (01:24 +0200)]
resolv.c: shrink code a bit in getnameinfo.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoaddr.c: get rid of a compiler warning
Peter S. Mazinger [Thu, 14 Apr 2011 23:17:17 +0000 (01:17 +0200)]
addr.c: get rid of a compiler warning

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotypes.h: both icc and tendra support long long
Peter S. Mazinger [Thu, 14 Apr 2011 22:31:42 +0000 (00:31 +0200)]
types.h: both icc and tendra support long long

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agossp: rework, sync messages with the ones in glibc
Peter S. Mazinger [Thu, 14 Apr 2011 22:19:28 +0000 (00:19 +0200)]
ssp: rework, sync messages with the ones in glibc

Touch signals only if DODEBUG is enabled.
Make the signal selection dependent on DODEBUG, as last resort use SIGKILL.
Use internal functions with less arguments, some savings.
Fix a warning about unused argument.
Do not use openlog/closelog, while there remove their hidden versions.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosyslog.c: disable locking in setlogmask
Peter S. Mazinger [Thu, 14 Apr 2011 13:51:10 +0000 (15:51 +0200)]
syslog.c: disable locking in setlogmask

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agossp-local.c: make sure that -fstack-protector is not enabled when compiling file
Peter S. Mazinger [Thu, 14 Apr 2011 13:44:43 +0000 (15:44 +0200)]
ssp-local.c: make sure that -fstack-protector is not enabled when compiling file

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosyslog.c: no need for hidden vsyslog, use a static __vsyslog instead
Peter S. Mazinger [Thu, 14 Apr 2011 13:37:22 +0000 (15:37 +0200)]
syslog.c: no need for hidden vsyslog, use a static __vsyslog instead

It is only used within the same file.
Guard the visible version according to header.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomake UCLIBC_HAS_PROGRAM_INVOCATION_NAME and UCLIBC_HAS___PROGNAME independent options
Peter S. Mazinger [Thu, 14 Apr 2011 13:30:22 +0000 (15:30 +0200)]
make UCLIBC_HAS_PROGRAM_INVOCATION_NAME and UCLIBC_HAS___PROGNAME independent options

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotempname.c: remove unneeded attribute_hidden, change type to unsigned
Peter S. Mazinger [Thu, 14 Apr 2011 11:20:26 +0000 (13:20 +0200)]
tempname.c: remove unneeded attribute_hidden, change type to unsigned

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowordexp.c: use vfork instead of fork on non-MMU archs
Peter S. Mazinger [Thu, 14 Apr 2011 10:56:56 +0000 (12:56 +0200)]
wordexp.c: use vfork instead of fork on non-MMU archs

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd LDSO_SAFE_RUNPATH config option
Peter S. Mazinger [Thu, 14 Apr 2011 10:52:23 +0000 (12:52 +0200)]
add LDSO_SAFE_RUNPATH config option

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoget_kernel_syms.c: reorganize, no need for attribute_unused in prototype
Peter S. Mazinger [Wed, 13 Apr 2011 19:58:37 +0000 (21:58 +0200)]
get_kernel_syms.c: reorganize, no need for attribute_unused in prototype

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetgroups.c: reorganize, include param.h instead of defining MIN
Peter S. Mazinger [Wed, 13 Apr 2011 19:52:44 +0000 (21:52 +0200)]
getgroups.c: reorganize, include param.h instead of defining MIN

Include only what is necessary.
Mark __syscall_getgroups __always_inline.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_exit.c: add ABORT_INSTRUCTION
Peter S. Mazinger [Tue, 12 Apr 2011 20:36:24 +0000 (22:36 +0200)]
_exit.c: add ABORT_INSTRUCTION

Warn if the arch has no  __UCLIBC_ABORT_INSTRUCTION__.
Run only one syscall, exit_group is not an exclusivity, use it if THREADS are enabled.
Guard according header.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agostdlib.c: remove comment about _Exit, it is provided in _exit.c
Peter S. Mazinger [Tue, 12 Apr 2011 20:11:15 +0000 (22:11 +0200)]
stdlib.c: remove comment about _Exit, it is provided in _exit.c

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agohppa/bits/atomic.h: include errno.h to get EFAULT/ENOSYS
Peter S. Mazinger [Tue, 12 Apr 2011 20:10:32 +0000 (22:10 +0200)]
hppa/bits/atomic.h: include errno.h to get EFAULT/ENOSYS

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd lcong48[_r]
Peter S. Mazinger [Tue, 12 Apr 2011 20:01:42 +0000 (22:01 +0200)]
add lcong48[_r]

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetpt.c: no need for hidden posix_openpt
Peter S. Mazinger [Tue, 12 Apr 2011 15:20:51 +0000 (17:20 +0200)]
getpt.c: no need for hidden posix_openpt

Prefer static inline instead of hidden (__bsd_getpt)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_exit.c: include the proper headers
Peter S. Mazinger [Fri, 8 Apr 2011 20:17:59 +0000 (22:17 +0200)]
_exit.c: include the proper headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomunmap.c: do not include unistd.h
Peter S. Mazinger [Fri, 8 Apr 2011 19:40:18 +0000 (21:40 +0200)]
munmap.c: do not include unistd.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoPORTING: remove obsolete comment about readelf
Peter S. Mazinger [Thu, 7 Apr 2011 21:46:22 +0000 (23:46 +0200)]
PORTING: remove obsolete comment about readelf

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-iterate-phdr.c: no need for visible __dl_iterate_phdr, make it static
Peter S. Mazinger [Thu, 7 Apr 2011 21:13:12 +0000 (23:13 +0200)]
dl-iterate-phdr.c: no need for visible __dl_iterate_phdr, make it static

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoposix_fadvise: make posix_fadvise[64] similar on all archs
Peter S. Mazinger [Wed, 6 Apr 2011 13:36:54 +0000 (15:36 +0200)]
posix_fadvise: make posix_fadvise[64] similar on all archs

Remove all versions, that can be covered by the common one.
Drop incorrectly implemented fallback support, if __NR_fadvise64_64 is not available.
To support 64 bit ppc, move ppc support into common.
Cleanup including headers.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoi386/posix_fadvise64: remove fallback code, uClibc does not do that
Peter S. Mazinger [Wed, 6 Apr 2011 10:53:11 +0000 (12:53 +0200)]
i386/posix_fadvise64: remove fallback code, uClibc does not do that

Makefile.arch: include it only if ADVANCED_REALTIME is defined.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosplice,sync_file_range: mark them as GNU extensions
Peter S. Mazinger [Wed, 6 Apr 2011 10:37:52 +0000 (12:37 +0200)]
splice,sync_file_range: mark them as GNU extensions

They can't be compiled if LFS is disabled, they are using off64_t.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotee,vmsplice: mark them as GNU extensions
Peter S. Mazinger [Wed, 6 Apr 2011 10:36:33 +0000 (12:36 +0200)]
tee,vmsplice: mark them as GNU extensions

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoreadahead.c: add correct guards
Peter S. Mazinger [Wed, 6 Apr 2011 10:32:15 +0000 (12:32 +0200)]
readahead.c: add correct guards

While there, remove unneeded headers.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocacheflush.c: compile only if __NR_cacheflush is available
Peter S. Mazinger [Tue, 5 Apr 2011 14:29:53 +0000 (16:29 +0200)]
cacheflush.c: compile only if __NR_cacheflush is available

The header had to be removed under the guard, else asm/cachectl.h might
not be available at all.
While there, disable __cachectl prototype.
Use untyped strong_alias for cacheflush because char * != void *.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-defs.h: avoid including dl-sysdep.h if compiling hostutils
Peter S. Mazinger [Sat, 2 Apr 2011 01:34:42 +0000 (03:34 +0200)]
dl-defs.h: avoid including dl-sysdep.h if compiling hostutils

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomips/README: fix comment about file from which functions were copied
Peter S. Mazinger [Thu, 31 Mar 2011 19:51:32 +0000 (21:51 +0200)]
mips/README: fix comment about file from which functions were copied

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoutils: expand search path to find dl-sysdep.h
Peter S. Mazinger [Thu, 31 Mar 2011 08:19:52 +0000 (10:19 +0200)]
utils: expand search path to find dl-sysdep.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_collate.c: avoid initialization warning
Peter S. Mazinger [Thu, 31 Mar 2011 08:19:02 +0000 (10:19 +0200)]
_collate.c: avoid initialization warning

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_fpmaxtostr.c: align comments, no code change
Peter S. Mazinger [Thu, 31 Mar 2011 08:17:26 +0000 (10:17 +0200)]
_fpmaxtostr.c: align comments, no code change

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoarm: avoid 2 compiler warnings
Peter S. Mazinger [Thu, 31 Mar 2011 08:16:31 +0000 (10:16 +0200)]
arm: avoid 2 compiler warnings

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoldso: use _dl_strdup and _dl_dprintf only in ld-uClibc.so
Peter S. Mazinger [Wed, 30 Mar 2011 22:20:50 +0000 (00:20 +0200)]
ldso: use _dl_strdup and _dl_dprintf only in ld-uClibc.so

Add support for %p to _dl_dprintf for later corrections in debug messages.
Disable _dl_debug_file if LD debugging is not enabled and change it's use to 2.

The use of dprintf in elfinterp.c will spit out warnings, will be fixed in the
reworked ldso.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosh: remove longjmp.c, the common is good for sh
Peter S. Mazinger [Wed, 30 Mar 2011 21:09:15 +0000 (23:09 +0200)]
sh: remove longjmp.c, the common is good for sh

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosh: add back clone and vfork for non-NPTL
Peter S. Mazinger [Wed, 30 Mar 2011 21:07:52 +0000 (23:07 +0200)]
sh: add back clone and vfork for non-NPTL

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoRules.mak: add ldso search paths independently of NPTL
Peter S. Mazinger [Wed, 30 Mar 2011 20:20:27 +0000 (22:20 +0200)]
Rules.mak: add ldso search paths independently of NPTL

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_pthread.h: remove __pthread_mutex_destroy, unused
Peter S. Mazinger [Sun, 27 Mar 2011 00:58:07 +0000 (01:58 +0100)]
uClibc_pthread.h: remove __pthread_mutex_destroy, unused

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadapt regex to new regex.h
Peter S. Mazinger [Sun, 27 Mar 2011 00:54:39 +0000 (01:54 +0100)]
adapt regex to new regex.h

While there, add some defines to help build, cleanup

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoftw.c: errno.h has to be included before undefining _LIBC
Peter S. Mazinger [Sun, 27 Mar 2011 00:39:39 +0000 (01:39 +0100)]
ftw.c: errno.h has to be included before undefining _LIBC

While, cleanup a bit

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoregex_old.c: adapt to new regex.h
Peter S. Mazinger [Sat, 26 Mar 2011 23:53:01 +0000 (00:53 +0100)]
regex_old.c: adapt to new regex.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-string.h: include dl-defs.h instead of dl-sysdep.h
Peter S. Mazinger [Sat, 26 Mar 2011 20:43:16 +0000 (21:43 +0100)]
dl-string.h: include dl-defs.h instead of dl-sysdep.h

Include stddef.h instead of defining NULL
Adapt guard to file name.
Reorder includes a bit.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-defs.h: include dl-sysdep.h before fallbacks.
Peter S. Mazinger [Sat, 26 Mar 2011 20:40:01 +0000 (21:40 +0100)]
dl-defs.h: include dl-sysdep.h before fallbacks.

dl-sysdep.h has to come before the fallbacks in dl-defs.h,
else the wrong macros are used.

While there adapt the guard to the file name.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-elf.h: add some includes and fix comments
Peter S. Mazinger [Sat, 26 Mar 2011 20:38:11 +0000 (21:38 +0100)]
dl-elf.h: add some includes and fix comments

While there change the guard of the file

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoldso/include: change guard of headers to reflect the file names.
Peter S. Mazinger [Sat, 26 Mar 2011 20:37:08 +0000 (21:37 +0100)]
ldso/include: change guard of headers to reflect the file names.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoregex.h: sync with glibc, making it more POSIX-like
Peter S. Mazinger [Sat, 26 Mar 2011 17:36:19 +0000 (18:36 +0100)]
regex.h: sync with glibc, making it more POSIX-like

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibdl.c: disable dlinfo
Peter S. Mazinger [Sat, 26 Mar 2011 16:41:29 +0000 (17:41 +0100)]
libdl.c: disable dlinfo

dlinfo is a GNU extension, it should be of the same type
as on glibc.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-string.h: change IS_IN_libdl guard to IS_IN_rtld
Peter S. Mazinger [Sat, 26 Mar 2011 00:13:29 +0000 (01:13 +0100)]
dl-string.h: change IS_IN_libdl guard to IS_IN_rtld

The guard is changed to allow to be used the file in libc as well.
Include string.h (although already included by ldso.h).
Guard the rest of the file according to config options.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-string.h: use __powerpc__ guard instead of powerpc
Peter S. Mazinger [Sat, 26 Mar 2011 00:06:00 +0000 (01:06 +0100)]
dl-string.h: use __powerpc__ guard instead of powerpc

powerpc guard depends on the compiler options, __powerpc__ should
work all the time.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-string.h: remove mips related guard
Peter S. Mazinger [Sat, 26 Mar 2011 00:04:07 +0000 (01:04 +0100)]
dl-string.h: remove mips related guard

This can't happen, __mips__ was already checked earlier

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove uClibc_mutex.h on install
Peter S. Mazinger [Fri, 25 Mar 2011 12:08:19 +0000 (13:08 +0100)]
remove uClibc_mutex.h on install

Add a comment to uClibc_stdio.h to keep macros in sync with uClibc_mutex.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoldd.c: change syntax, no size and no functional change
Peter S. Mazinger [Thu, 24 Mar 2011 23:56:59 +0000 (00:56 +0100)]
ldd.c: change syntax, no size and no functional change

Proposed-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_scanf.c: fix to signedness warnings
Peter S. Mazinger [Thu, 24 Mar 2011 23:56:14 +0000 (00:56 +0100)]
_scanf.c: fix to signedness warnings

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