OSDN Git Service

uclinux-h8/uClibc.git
11 years agoerrno and *_init cleanup
Peter S. Mazinger [Wed, 23 Mar 2011 16:08:07 +0000 (17:08 +0100)]
errno and *_init cleanup

Define a common view of __errno_location, __h_errno_location in common header
and use that everywhere, __uClibc_main.c is no special.
The rule adopted:
for enabled threads we make in libc the __GI_x() variants strong, x() weak
and (should) provide another strong x() in libpthread.
If threads are disabled, even the __GI_x() variants are weak.

_stdio_init,_stdio_term,_locale_init: make all hidden weak in common header

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibrt: provide missing prototypes for mq_timedreceive,mq_timedsend
Peter S. Mazinger [Wed, 23 Mar 2011 14:24:46 +0000 (15:24 +0100)]
librt: provide missing prototypes for mq_timedreceive,mq_timedsend

If ADVANCED_REALTIME is disabled, these prototypes are missing and
librt_hidden_proto() fails.
Makefile.in: added a comment, we build mq_timedreceive/mq_timedsend
on NPTL even if ADVANCED_REALTIME is disabled.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibrt: get rid of visible __mq_timed(send,receive)
Peter S. Mazinger [Wed, 23 Mar 2011 14:05:06 +0000 (15:05 +0100)]
librt: get rid of visible __mq_timed(send,receive)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoConfig.in.arch: remove UCLIBC_FORMAT_ELF config option
Peter S. Mazinger [Wed, 23 Mar 2011 12:31:53 +0000 (13:31 +0100)]
Config.in.arch: remove UCLIBC_FORMAT_ELF config option

Unused option (and is in !ARCH_HAS_MMU guarded section, but depends on ARCH_HAS_MMU)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_stdio.h: change the guard used to include stdio-lock.h
Peter S. Mazinger [Wed, 23 Mar 2011 10:19:29 +0000 (11:19 +0100)]
uClibc_stdio.h: change the guard used to include stdio-lock.h

My intention was to get rid of uClibc_mutex.h completely on install, but it
introduces other dependencies. It affects anyway only the installed case.

Note: since NPTL was added, the FILE structure changes between the build
and the installed version. I wanted to fix this by the earlier commit.
Reverting the behaviour to IMHO a wrong one.

While there, remove libc-lock.h and stdio-lock.h on install (even though
glibc has them -wrongly- installed).

Reported-by: Tony Wu <tung7970@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 agoutime.c,utimes.c: include headers only when needed
Peter S. Mazinger [Wed, 23 Mar 2011 10:02:27 +0000 (11:02 +0100)]
utime.c,utimes.c: include headers only when needed

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago__uClibc_main.c: make __uClibc_init hidden
Peter S. Mazinger [Tue, 22 Mar 2011 07:30:39 +0000 (08:30 +0100)]
__uClibc_main.c: make __uClibc_init hidden

The linker can cope with it if it is hidden.
No need for the __GI___uClibc_init.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoclock_{g,s}ettime.c,{create,delete}_module.c: cleanup
Peter S. Mazinger [Tue, 22 Mar 2011 00:04:30 +0000 (01:04 +0100)]
clock_{g,s}ettime.c,{create,delete}_module.c: cleanup

Do not include unneeded headers.
Move headers to the needed place.
Fix a comment typo.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowrapsyscall.c: include proper header for epoll
Peter S. Mazinger [Mon, 23 Apr 2012 15:58:42 +0000 (17:58 +0200)]
wrapsyscall.c: include proper header for epoll

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd epoll_pwait()
Peter S. Mazinger [Tue, 22 Mar 2011 00:02:10 +0000 (01:02 +0100)]
add epoll_pwait()

Change const to __const while at it.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosysconf.c: the clock_getres function is good for NPTL as well
Peter S. Mazinger [Mon, 21 Mar 2011 23:20:36 +0000 (00:20 +0100)]
sysconf.c: the clock_getres function is good for NPTL as well

Even if glibc reuses the syscall (bloat), we can reuse the function.
Make sure, that we use it only if it is provided by the syscall
and the function is really around (UCLIBC_HAS_REALTIME disables it),
else we get into a loop.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoclock_getres.c: include unistd.h unless syscall is defined
Peter S. Mazinger [Mon, 21 Mar 2011 23:19:24 +0000 (00:19 +0100)]
clock_getres.c: include unistd.h unless syscall 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 agoConfig.in: NPTL does not compile with disabled UCLIBC_HAS_REALTIME
Peter S. Mazinger [Mon, 21 Mar 2011 23:18:05 +0000 (00:18 +0100)]
Config.in: NPTL does not compile with disabled UCLIBC_HAS_REALTIME

Select it.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agochdir.c: simplify code
Peter S. Mazinger [Mon, 21 Mar 2011 22:29:52 +0000 (23:29 +0100)]
chdir.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 agomemmove.c,strchrnul.c: use real name in libc_hidden_def
Peter S. Mazinger [Mon, 21 Mar 2011 22:27:24 +0000 (23:27 +0100)]
memmove.c,strchrnul.c: use real name in libc_hidden_def

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agobcopy.c,bzero.c: include string.h instead of _string.h
Peter S. Mazinger [Mon, 21 Mar 2011 22:20:05 +0000 (23:20 +0100)]
bcopy.c,bzero.c: include string.h instead of _string.h

No need for internal _string.h.
For now include string.h, although the correct header would be strings.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_vfprintf.c: use _fpmaxtostr.h
Peter S. Mazinger [Mon, 21 Mar 2011 22:06:05 +0000 (23:06 +0100)]
_vfprintf.c: use _fpmaxtostr.h

remove code already in _fpmaxtostr.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_vfprintf.c: get rid of __STDIO_PRINTF_FLOAT
Peter S. Mazinger [Mon, 21 Mar 2011 21:59:04 +0000 (22:59 +0100)]
_vfprintf.c: get rid of __STDIO_PRINTF_FLOAT

Rely completely on the configuration options chosen,
in this case on UCLIBC_HAS_FLOATS.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoold_vfprintf.c: use _fpmaxtostr.h
Peter S. Mazinger [Mon, 21 Mar 2011 21:51:16 +0000 (22:51 +0100)]
old_vfprintf.c: use _fpmaxtostr.h

It shows that the internal functions differ...

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: move common to _fpmaxtostr.h
Peter S. Mazinger [Mon, 21 Mar 2011 21:34:14 +0000 (22:34 +0100)]
_fpmaxtostr.c: move common to _fpmaxtostr.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolckpwdf.c: add back lost return
Peter S. Mazinger [Mon, 21 Mar 2011 16:09:40 +0000 (17:09 +0100)]
lckpwdf.c: add back lost return

2 earlier (2006 and 2009) commits killed the proper return: -1 for failure, 0 on success

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetttyent.c: include stdio_ext.h only when needed
Peter S. Mazinger [Mon, 21 Mar 2011 15:29:30 +0000 (16:29 +0100)]
getttyent.c: include stdio_ext.h only when needed

do not include pthread.h as the locking macro is provided 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 agotime.c: fix a guard to avoid a warning about unused label
Peter S. Mazinger [Mon, 21 Mar 2011 15:26:08 +0000 (16:26 +0100)]
time.c: fix a guard to avoid a warning about unused label

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodirname.c: include only what is needed
Peter S. Mazinger [Mon, 21 Mar 2011 14:55:51 +0000 (15:55 +0100)]
dirname.c: include only what is needed

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agobasename.c: define it correctly, use the proper header for each version
Peter S. Mazinger [Mon, 21 Mar 2011 14:34:26 +0000 (15:34 +0100)]
basename.c: define it correctly, use the proper header for each version

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomalloc.h: hide internal functions (mainly debug related)
Peter S. Mazinger [Mon, 21 Mar 2011 14:25:49 +0000 (15:25 +0100)]
malloc.h: hide internal functions (mainly debug related)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomalloc-simple: make _aligned_blocks static and __libc_free_aligned hidden
Peter S. Mazinger [Mon, 21 Mar 2011 14:01:50 +0000 (15:01 +0100)]
malloc-simple: make _aligned_blocks static and __libc_free_aligned hidden

move __libc_free_aligned prototype up to a common place.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomalloc: use uClibc_mutex.h provided macros consequently
Peter S. Mazinger [Mon, 21 Mar 2011 13:43:50 +0000 (14:43 +0100)]
malloc: use uClibc_mutex.h provided macros consequently

use the __UCLIBC_MUTEX macros
remove unused code
remove duplicated code (likely,unlikely)
hide internal __x() functions (mainly debug related)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomemalign.c: does not use MAX, do not include param.h
Peter S. Mazinger [Mon, 21 Mar 2011 13:29:54 +0000 (14:29 +0100)]
memalign.c: does not use MAX, do not include param.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_vfprintf.c: fix typo s/NL_MAX_ARG/NL_ARGMAX/
Peter S. Mazinger [Mon, 21 Mar 2011 12:08:33 +0000 (13:08 +0100)]
_vfprintf.c: fix typo s/NL_MAX_ARG/NL_ARGMAX/

NL_MAX_ARG does not exist.

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.h: move _load_inttype.h and _store_inttype.h prototypes here
Peter S. Mazinger [Mon, 21 Mar 2011 12:02:20 +0000 (13:02 +0100)]
_stdio.h: move _load_inttype.h and _store_inttype.h prototypes here

Use one common prototype for consistency.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosocketcalls.c: prefer using recvfrom in recv and sendto in send
Peter S. Mazinger [Mon, 21 Mar 2011 11:53:25 +0000 (12:53 +0100)]
socketcalls.c: prefer using recvfrom in recv and sendto in send

Make socketcall the last alternative.

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: include KERNEL_HEADERS last, even there it is wrong
Peter S. Mazinger [Sun, 20 Mar 2011 03:24:34 +0000 (04:24 +0100)]
Rules.mak: include KERNEL_HEADERS last, even there it is wrong

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: change the way -include is used
Peter S. Mazinger [Sun, 20 Mar 2011 03:20:23 +0000 (04:20 +0100)]
Rules.mak: change the way -include is used

Other compilers do not expect absolute path after -include,
they want to find the included file by path search (-I).
While there, prefer $(TARGET_ARCH) before common path.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodo not define _ISOC99_SOURCE in specific files
Peter S. Mazinger [Sun, 20 Mar 2011 02:20:27 +0000 (03:20 +0100)]
do not define _ISOC99_SOURCE in specific files

This should come properly from features.h or the build.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove duplicate prototypes for _stdio_term().
Peter S. Mazinger [Sun, 20 Mar 2011 02:10:54 +0000 (03:10 +0100)]
remove duplicate prototypes for _stdio_term().

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agounwind-{resume,forcedunwind}.c: add missing prototypes
Peter S. Mazinger [Sun, 20 Mar 2011 01:45:16 +0000 (02:45 +0100)]
unwind-{resume,forcedunwind}.c: add missing prototypes

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agofix a bunch of build warnings
Peter S. Mazinger [Sun, 20 Mar 2011 01:38:48 +0000 (02:38 +0100)]
fix a bunch of build warnings

Added attribute_noreturn even if it has return at the end of function

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopthreadP.h: avoid shadow warnings
Peter S. Mazinger [Sun, 20 Mar 2011 01:21:38 +0000 (02:21 +0100)]
pthreadP.h: avoid shadow warnings

Change CANCELLATION_P macro and adapt usage.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodisable __pthread_kill_other_threads, obsoleted
Peter S. Mazinger [Sun, 20 Mar 2011 00:32:33 +0000 (01:32 +0100)]
disable __pthread_kill_other_threads, obsoleted

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: do not install on target
Peter S. Mazinger [Sat, 19 Mar 2011 23:25:55 +0000 (00:25 +0100)]
uClibc_pthread.h: do not install on target

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,time.c,_atexit.c: hide 3 locks
Peter S. Mazinger [Sat, 19 Mar 2011 23:19:01 +0000 (00:19 +0100)]
resolv.c,time.c,_atexit.c: hide 3 locks

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_mutex.h: fix bug in conditional macros
Peter S. Mazinger [Sat, 19 Mar 2011 22:10:06 +0000 (23:10 +0100)]
uClibc_mutex.h: fix bug in conditional macros

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosignal.h: sync with glibc, mainly proper guards
Peter S. Mazinger [Sat, 19 Mar 2011 18:42:42 +0000 (19:42 +0100)]
signal.h: sync with glibc, mainly proper guards

psiginfo() is disabled for now.
Take care syncing this file, there are 3 bugs in glibc

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_stdio.h: guard internals with _LIBC
Peter S. Mazinger [Sat, 19 Mar 2011 17:06:15 +0000 (18:06 +0100)]
uClibc_stdio.h: guard internals with _LIBC

Provide __UCLIBC_IO_MUTEX for the installed version

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_stdio.h: remove consistency check
Peter S. Mazinger [Sat, 19 Mar 2011 16:22:42 +0000 (17:22 +0100)]
uClibc_stdio.h: remove consistency check

Redefining stuff is no good for consistency, anyway,
Config.in takes care of this case, it can't happen.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouClibc_stdio.h: remove parts solved in features.h
Peter S. Mazinger [Sat, 19 Mar 2011 16:11:56 +0000 (17:11 +0100)]
uClibc_stdio.h: remove parts solved in features.h

Try to have one and only view of settings, no special handling for stdio code.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agostdio.h: move __STDIO_{GETC,PUTC}_MACRO dependent part to uClibc_stdio.h
Peter S. Mazinger [Sat, 19 Mar 2011 15:01:04 +0000 (16:01 +0100)]
stdio.h: move __STDIO_{GETC,PUTC}_MACRO dependent part to uClibc_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 agouClibc_stdio.h: move internal to _stdio.h and make them hidden
Peter S. Mazinger [Sat, 19 Mar 2011 14:51:14 +0000 (15:51 +0100)]
uClibc_stdio.h: move internal to _stdio.h and make them hidden

Move __stdio_mutex_init,_stdio_openlist_{use,del}_count to _stdio.h.
Make _stdio_validate_FILE hidden.
Make _stdio_openlist_{add,del}_lock hidden 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 agostdio.h: move uClibc specific parts to the common place for these changes
Peter S. Mazinger [Sat, 19 Mar 2011 14:06:06 +0000 (15:06 +0100)]
stdio.h: move uClibc specific parts to the common place for these changes

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agommap.c: provide a common mmap.c that is good for most of archs
Peter S. Mazinger [Sat, 19 Mar 2011 12:39:32 +0000 (13:39 +0100)]
mmap.c: provide a common mmap.c that is good for most of archs

Remove all others, only avr32 needs to be kept.
Define __UCLIBC_ARCH_HAS_6_ARGS__ where needed.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago_hsearch_r.c: use stdlib.h instead of malloc.h for calloc
Peter S. Mazinger [Sat, 19 Mar 2011 00:13:18 +0000 (01:13 +0100)]
_hsearch_r.c: use stdlib.h instead of malloc.h for calloc

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agofnmatch: replace __memset and __memcmp
Peter S. Mazinger [Sat, 19 Mar 2011 00:11:10 +0000 (01:11 +0100)]
fnmatch: replace __memset and __memcmp

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopm_getport.c: s/__close/close/
Peter S. Mazinger [Sat, 19 Mar 2011 00:06:39 +0000 (01:06 +0100)]
pm_getport.c: s/__close/close/

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: include param.h and use MIN instead of min
Peter S. Mazinger [Sat, 19 Mar 2011 00:05:36 +0000 (01:05 +0100)]
resolv.c: include param.h and use MIN instead of min

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosa_len.c: do not include ipx.h, the IPX code is disabled
Peter S. Mazinger [Fri, 18 Mar 2011 23:57:06 +0000 (00:57 +0100)]
sa_len.c: do not include ipx.h, the IPX code is disabled

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetaddrinfo.c: replace #if SALEN with #if 0
Peter S. Mazinger [Fri, 18 Mar 2011 23:53:05 +0000 (00:53 +0100)]
getaddrinfo.c: replace #if SALEN with #if 0

make it clear, that the code is disabled

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agochange __asm to __asm__ and __volatile to __volatile__
Peter S. Mazinger [Fri, 18 Mar 2011 23:49:00 +0000 (00:49 +0100)]
change __asm to __asm__ and __volatile to __volatile__

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopwd_grp_internal.c: do not include pthread.h
Peter S. Mazinger [Fri, 18 Mar 2011 23:38:04 +0000 (00:38 +0100)]
pwd_grp_internal.c: do not include pthread.h

stdio.h provides __STDIO* locking related macros

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoiconv.c: make iconv use the XPG version of basename
Peter S. Mazinger [Fri, 18 Mar 2011 23:33:39 +0000 (00:33 +0100)]
iconv.c: make iconv use the XPG version of basename

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoallocrtsig.c,pthread.c: disable __libc_allocate_rtsig, unused
Peter S. Mazinger [Fri, 18 Mar 2011 23:23:36 +0000 (00:23 +0100)]
allocrtsig.c,pthread.c: disable __libc_allocate_rtsig, unused

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosetjmp.h: move __sigjmp_save prototype for consistency
Peter S. Mazinger [Fri, 18 Mar 2011 23:17:56 +0000 (00:17 +0100)]
setjmp.h: move __sigjmp_save prototype for consistency

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoallocsigrt.c: provide proper crrent_rtmin for LT new
Peter S. Mazinger [Fri, 18 Mar 2011 22:55:37 +0000 (23:55 +0100)]
allocsigrt.c: provide proper crrent_rtmin for LT new

might be good for LT old as well

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibc-internal.h: provide dummy attribute_tls_model_ie and __thread for non TLS builds
Peter S. Mazinger [Fri, 18 Mar 2011 22:33:19 +0000 (23:33 +0100)]
libc-internal.h: provide dummy attribute_tls_model_ie and __thread for non TLS builds

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolocale.c, uClibc_locale.h: provide hidden __curlocale[_set]
Peter S. Mazinger [Fri, 18 Mar 2011 22:30:19 +0000 (23:30 +0100)]
locale.c, uClibc_locale.h: provide hidden __curlocale[_set]

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago*_strerror_r.c: keep all occurences in sync with string.h
Peter S. Mazinger [Fri, 18 Mar 2011 22:21:15 +0000 (23:21 +0100)]
*_strerror_r.c: keep all occurences in sync with string.h

libc-internal.h: this has to provide the reversed case of what string.h defines.
Accomodate for later possibility to compile without _GNU_SOURCE defined

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoerr.c: add attribute_noreturn to static functions
Peter S. Mazinger [Fri, 18 Mar 2011 20:36:04 +0000 (21:36 +0100)]
err.c: add attribute_noreturn to static functions

while there, remove unneeded pthread.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoerr.c, err.h: no need for hidden functions
Peter S. Mazinger [Fri, 18 Mar 2011 20:29:02 +0000 (21:29 +0100)]
err.c, err.h: no need for hidden functions

Since we reuse the functions in the same file, provide static __X()
and use strong_alias to provide the visible functions.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agorpc: constify some more data
Peter S. Mazinger [Fri, 18 Mar 2011 20:22:12 +0000 (21:22 +0100)]
rpc: constify some more data

Comments in header were used by vda on a similar commit

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoclnt_generic.c: whitespace only, no code change
Peter S. Mazinger [Fri, 18 Mar 2011 20:21:26 +0000 (21:21 +0100)]
clnt_generic.c: whitespace only, 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 agopm_getmaps.c: change __close to close (even though unused)
Peter S. Mazinger [Fri, 18 Mar 2011 20:20:07 +0000 (21:20 +0100)]
pm_getmaps.c: change __close to close (even though unused)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoruserpass.c: needs stdio_ext.h only if threads are enabled
Peter S. Mazinger [Fri, 18 Mar 2011 20:19:15 +0000 (21:19 +0100)]
ruserpass.c: needs stdio_ext.h only if threads are enabled

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agorcmd.c: no need for stdio_ext.h
Peter S. Mazinger [Fri, 18 Mar 2011 20:18:49 +0000 (21:18 +0100)]
rcmd.c: no need for stdio_ext.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoxdr_intXX_t.c,xdr.h: add xdr_quad_t and xdr_u_quad_t
Peter S. Mazinger [Fri, 18 Mar 2011 20:14:16 +0000 (21:14 +0100)]
xdr_intXX_t.c,xdr.h: add xdr_quad_t and xdr_u_quad_t

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosvc_auth.c: use same prototypes as in svc_authux.c
Peter S. Mazinger [Fri, 18 Mar 2011 19:31:54 +0000 (20:31 +0100)]
svc_auth.c: use same prototypes as in svc_authux.c

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agopmap_rmt.c: do not undefine _POSIX_SOURCE, it is anyway too late
Peter S. Mazinger [Fri, 18 Mar 2011 18:59:11 +0000 (19:59 +0100)]
pmap_rmt.c: do not undefine _POSIX_SOURCE, it is anyway too late

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agorpc: remove unused USE_IN_LIBIO guarded code
Peter S. Mazinger [Fri, 18 Mar 2011 18:34:00 +0000 (19:34 +0100)]
rpc: remove unused USE_IN_LIBIO guarded code

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoarc4random.c: replace a comment
Peter S. Mazinger [Fri, 18 Mar 2011 18:15:37 +0000 (19:15 +0100)]
arc4random.c: replace a comment

Remove pointer to a dead link.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agostdlib.h, arc4random.c: fix arc4random return type to u_int32_t
Peter S. Mazinger [Fri, 18 Mar 2011 17:38:14 +0000 (18:38 +0100)]
stdlib.h, arc4random.c: fix arc4random return type to u_int32_t

Change uint32_t to u_int32_t and uint8_t to u_int8_t, removing
completely the dependency on stdint.h.

Based on patch by Timo Teraes <timo.teras@iki.fi>. His comment:
This also fixes a major bug that stdlib.h includes stdint.h. Things
might go very wrong because stdint.h has conditional defines and
if stdlib.h is included before #define's for stdint.h we end up
missing things and breaking builds (e.g. openjdk).

Signed-off-by: Timo Teraes <timo.teras@iki.fi>
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoarc4random.c: use smallint for rs_initialized
Peter S. Mazinger [Fri, 18 Mar 2011 15:06:16 +0000 (16:06 +0100)]
arc4random.c: use smallint for rs_initialized

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoarc4random.c: move arc4_getbyte up
Peter S. Mazinger [Fri, 18 Mar 2011 15:03:12 +0000 (16:03 +0100)]
arc4random.c: move arc4_getbyte up

no need for forward declarations

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: remove duplicated attribute_hidden
Peter S. Mazinger [Thu, 17 Mar 2011 00:31:58 +0000 (01:31 +0100)]
resolv.c: remove duplicated attribute_hidden

while there add one for future (currently in unused code)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agontohl.c: simplify and shrink ntohl and friends
Peter S. Mazinger [Wed, 16 Mar 2011 23:39:55 +0000 (00:39 +0100)]
ntohl.c: simplify and shrink ntohl and friends

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogeopt.c, LT new/pthread.c: s/__mempcpy/mempcpy/
Peter S. Mazinger [Wed, 16 Mar 2011 23:23:38 +0000 (00:23 +0100)]
geopt.c, LT new/pthread.c: s/__mempcpy/mempcpy/

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonios[2]/crt1.S: remove unused _stdio_init,_stdio_term and __h_errno_location
Peter S. Mazinger [Wed, 16 Mar 2011 23:14:04 +0000 (00:14 +0100)]
nios[2]/crt1.S: remove unused _stdio_init,_stdio_term and __h_errno_location

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodl-osinfo.h: include needed headers
Peter S. Mazinger [Wed, 16 Mar 2011 23:02:13 +0000 (00:02 +0100)]
dl-osinfo.h: include needed headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years ago__xpg_strerror_r.c, {ge,se}trlimit.c: use strong_alias_untyped
Peter S. Mazinger [Wed, 16 Mar 2011 22:50:43 +0000 (23:50 +0100)]
__xpg_strerror_r.c, {ge,se}trlimit.c: use strong_alias_untyped

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: get rid of the compiler workarounds by using strong_alias_untyped
Peter S. Mazinger [Wed, 16 Mar 2011 22:41:00 +0000 (23:41 +0100)]
stdlib.c: get rid of the compiler workarounds by using strong_alias_untyped

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotsd.c: fix comment
Peter S. Mazinger [Wed, 16 Mar 2011 22:11:48 +0000 (23:11 +0100)]
tsd.c: fix comment

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agowait.h: resource.h is included already, rusage is defined
Peter S. Mazinger [Wed, 16 Mar 2011 21:35:49 +0000 (22:35 +0100)]
wait.h: resource.h is included already, rusage 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 agosignal.h: disable sigreturn prototype
Peter S. Mazinger [Wed, 16 Mar 2011 21:29:59 +0000 (22:29 +0100)]
signal.h: disable sigreturn prototype

sigreturn is an internal linux specific function and is not exported

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosignal.h: disable ssignal and gsignal
Peter S. Mazinger [Wed, 16 Mar 2011 21:22:21 +0000 (22:22 +0100)]
signal.h: disable ssignal and gsignal

raise.c: only LT new provided gsignal, disable it

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolink.h: guard TLS related internals of struct link_map with _LIBC
Peter S. Mazinger [Wed, 16 Mar 2011 21:15:05 +0000 (22:15 +0100)]
link.h: guard TLS related internals of struct link_map with _LIBC

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoalphasort*.c: use strcoll instead of strcmp to support locales
Peter S. Mazinger [Wed, 16 Mar 2011 20:50:52 +0000 (21:50 +0100)]
alphasort*.c: use strcoll instead of strcmp to support locales

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agos_scalbn.c: since we have strong_alias_untyped now, use it
Peter S. Mazinger [Wed, 16 Mar 2011 20:15:16 +0000 (21:15 +0100)]
s_scalbn.c: since we have strong_alias_untyped now, use it

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoscandir,readdir[_t]: use one common source for X() and X64()
Peter S. Mazinger [Wed, 16 Mar 2011 20:07:18 +0000 (21:07 +0100)]
scandir,readdir[_t]: use one common source for X() and X64()

Since the sources differ only minimally, use only scandir.c,readdir[_t].c
and redefine the used functions accordingly.
Use a strong_alias instead of compiling *64.c if __WORDSIZE = 64

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoversionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64
Peter S. Mazinger [Wed, 16 Mar 2011 19:52:50 +0000 (20:52 +0100)]
versionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64

use a strong_alias instead

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agodirent.h: use __ssize_t instead of ssize_t
Peter S. Mazinger [Wed, 16 Mar 2011 19:50:39 +0000 (20:50 +0100)]
dirent.h: use __ssize_t instead of ssize_t

getdents[64].c: forgot to include dirent.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomove __getdents[64] prototypes to dirent.h
Peter S. Mazinger [Wed, 16 Mar 2011 19:23:02 +0000 (20:23 +0100)]
move __getdents[64] prototypes to dirent.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomath: avoid jump relocation in libm
Peter S. Mazinger [Wed, 16 Mar 2011 09:23:18 +0000 (10:23 +0100)]
math: avoid jump relocation in libm

add hidden significand, lgamma_r, scalb, log2, gamma

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