OSDN Git Service

uclinux-h8/uClibc.git
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>
11 years agok_standard.c: guard scalb[f] related (unused) code with SUSV3_LEGACY
Peter S. Mazinger [Wed, 16 Mar 2011 09:21:30 +0000 (10:21 +0100)]
k_standard.c: guard scalb[f] related (unused) code with SUSV3_LEGACY

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomathcalls.h: fix comment, MATHCALLI and MATHCALL_PRIV include libm_hidden_proto
Peter S. Mazinger [Wed, 16 Mar 2011 08:59:42 +0000 (09:59 +0100)]
mathcalls.h: fix comment, MATHCALLI and MATHCALL_PRIV include libm_hidden_proto

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibm: remove superfluos attribute_hidden, the one in prototype is enough
Peter S. Mazinger [Wed, 16 Mar 2011 08:34:36 +0000 (09:34 +0100)]
libm: remove superfluos attribute_hidden, the one in prototype is enough

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibm: change j0 to _j0 and y1 to _y1 to avoid shadow warning
Peter S. Mazinger [Wed, 16 Mar 2011 08:24:48 +0000 (09:24 +0100)]
libm: change j0 to _j0 and y1 to _y1 to avoid shadow warning

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoupdate partially string.h and strings.h
Peter S. Mazinger [Tue, 15 Mar 2011 22:51:59 +0000 (23:51 +0100)]
update partially string.h and 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 agodirstream.h: remove unused constants
Peter S. Mazinger [Tue, 15 Mar 2011 21:17:10 +0000 (22:17 +0100)]
dirstream.h: remove unused constants

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoquota.h: update, but keep old functionality
Peter S. Mazinger [Tue, 15 Mar 2011 21:01:24 +0000 (22:01 +0100)]
quota.h: update, but keep old functionality

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: update partially, mainly for POSIX 2008
Peter S. Mazinger [Tue, 15 Mar 2011 20:53:22 +0000 (21:53 +0100)]
stdio.h: update partially, mainly for POSIX 2008

Guard some UCLIBC specific parts.
Add comment about bits/getopt.h.
open_memstream.c: remove __restrict according to SuSv4.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agounistd.h: partial update, mostly related to POSIX 2008
Peter S. Mazinger [Tue, 15 Mar 2011 20:20:43 +0000 (21:20 +0100)]
unistd.h: partial update, mostly related to POSIX 2008

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_fini() hidden
Peter S. Mazinger [Tue, 15 Mar 2011 19:15:06 +0000 (20:15 +0100)]
make __uClibc_fini() hidden

No need for a visible version

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agonetdb.h: partial update, adding some __USE_MISC/__USE_GNU guards
Peter S. Mazinger [Tue, 15 Mar 2011 19:12:15 +0000 (20:12 +0100)]
netdb.h: partial update, adding some __USE_MISC/__USE_GNU guards

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoremove libc_hidden_proto(ioperm) from all headers except arm
Peter S. Mazinger [Tue, 15 Mar 2011 15:53:01 +0000 (16:53 +0100)]
remove libc_hidden_proto(ioperm) from all headers except arm

While there, guard everywhere ioperm and iopl prototypes with __UCLIBC_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 agono need for hidden lockf64
Peter S. Mazinger [Tue, 15 Mar 2011 14:55:17 +0000 (15:55 +0100)]
no need for hidden lockf64

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoutent.c, wtent.c: move functions from utxent.c
Peter S. Mazinger [Tue, 15 Mar 2011 14:29:14 +0000 (15:29 +0100)]
utent.c, wtent.c: move functions from utxent.c

before the change (threads enabled)
   text    data     bss     dec     hex filename
   1107       8     408    1523     5f3 libc/misc/utmp/utent.os
    152       0       0     152      98 libc/misc/utmp/wtent.os
    240       0       0     240      f0 libc/misc/utmp/utxent.os
after the change
   text    data     bss     dec     hex filename
   1072       8     408    1488     5d0 libc/misc/utmp/utent.os
    157       0       0     157      9d libc/misc/utmp/wtent.os
    200       0       0     200      c8 libc/misc/utmp/utxent.os

The smaller size on utent.os is unexpected, could be due to better inlining/not inlining

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoutent.c: go back to use static __X() functions without size increase
Peter S. Mazinger [Tue, 15 Mar 2011 12:54:31 +0000 (13:54 +0100)]
utent.c: go back to use static __X() functions without size increase

__X() {...} and strong_alias(__X,X) keeps size the same as X() {...}

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agouse fputwc in putwchar()
Peter S. Mazinger [Mon, 14 Mar 2011 22:11:32 +0000 (23:11 +0100)]
use fputwc in putwchar()

use fputwc instead of fputc
add hidden fputwc to avoid jump relocation

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agofputc.c, stdio.h: no need for hidden putc, putc_unlocked and fputc_unlocked
Peter S. Mazinger [Mon, 14 Mar 2011 21:59:44 +0000 (22:59 +0100)]
fputc.c, stdio.h: no need for hidden putc, putc_unlocked and fputc_unlocked

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocleanup fork()
Peter S. Mazinger [Mon, 14 Mar 2011 18:58:35 +0000 (19:58 +0100)]
cleanup fork()

Keep only fork (and it's hidden variant) and __libc_fork.
Common __libc_fork prototype in unistd.h.
Get rid of __fork, by changing HIDDEN_JUMPTARGET(__fork) to use fork
I can't see the reason to have fork() in libpthread, but kept it for now
making __fork static in these files.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosemaphore.h, uClibc_local_lim.h: make sure SEM_VALUE_MAX is always defined
Peter S. Mazinger [Mon, 14 Mar 2011 17:33:13 +0000 (18:33 +0100)]
semaphore.h, uClibc_local_lim.h: make sure SEM_VALUE_MAX is always defined

LT old and new provided SEM_VALUE_MAX in semaphore.h, NPTL in local_lim.h
Make sure to get the same definitions, independently of the fact, that
semaphore.h is included or not.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agosemaphore.c: include limits.h before semaphore.h
Peter S. Mazinger [Mon, 14 Mar 2011 16:45:43 +0000 (17:45 +0100)]
semaphore.c: include limits.h before semaphore.h

else SEM_VALUE_MAX will be undefined

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agohuge_val.h: add for vax
Peter S. Mazinger [Mon, 14 Mar 2011 11:59:11 +0000 (12:59 +0100)]
huge_val.h: add for vax

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agohuge_vall.h: add for i386,ia64,m68k,sparc
Peter S. Mazinger [Mon, 14 Mar 2011 11:57:18 +0000 (12:57 +0100)]
huge_vall.h: add for i386,ia64,m68k,sparc

relevant only for gcc < 3.3 or non-gcc compiler

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoposix_opt.h: update to POSIX 2008
Peter S. Mazinger [Mon, 14 Mar 2011 11:37:56 +0000 (12:37 +0100)]
posix_opt.h: update to POSIX 2008

uClibc_posix_opt.h: adapt accordingly

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoposix_opt.h: update to glibc's NPTL version
Peter S. Mazinger [Mon, 14 Mar 2011 11:27:09 +0000 (12:27 +0100)]
posix_opt.h: update to glibc's NPTL version

add uClibc_posix_opt.h to handle uClibc specific options/features

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolocal_lim.h: add NPTL version for alpha,ia64,powerpc,sparc, update common
Peter S. Mazinger [Mon, 14 Mar 2011 10:53:52 +0000 (11:53 +0100)]
local_lim.h: add NPTL version for alpha,ia64,powerpc,sparc, update common

avoid the possibility to use the wrong bits/local_lim.h
uClibc_local_lim.h fix it be correct for LT

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agotgmath.h: disable builtins
Peter S. Mazinger [Mon, 14 Mar 2011 10:08:50 +0000 (11:08 +0100)]
tgmath.h: disable builtins

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd jmpbuf-unwind.h and jmpbuf-offsets.h to avr32,c6x and xtensa
Peter S. Mazinger [Sun, 13 Mar 2011 21:21:26 +0000 (22:21 +0100)]
add jmpbuf-unwind.h and jmpbuf-offsets.h to avr32,c6x and xtensa

cleanup bits/setjmp.h and avr32's setjmp.S

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agochange __HAVE_FPU__ to __UCLIBC_HAS_FPU__
Peter S. Mazinger [Sun, 13 Mar 2011 20:48:22 +0000 (21:48 +0100)]
change __HAVE_FPU__ to __UCLIBC_HAS_FPU__

add features.h where necessary

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agocleanup bits/setjmp.h of stuff moved to jmpbuf-offsets.h and jmpbuf-unwind.h
Peter S. Mazinger [Sun, 13 Mar 2011 20:43:14 +0000 (21:43 +0100)]
cleanup bits/setjmp.h of stuff moved to jmpbuf-offsets.h and jmpbuf-unwind.h

Make sure we use the new jmpbuf-*.h headers
While there, adapt the offset on microblaze and the _JMPBUF_UNWINDS macro on bfin,
it seems, these were changed in the meantime.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomake use of jmpbuf-offsets.h and jmpbuf-unwind.h
Peter S. Mazinger [Sun, 13 Mar 2011 20:24:42 +0000 (21:24 +0100)]
make use of jmpbuf-offsets.h and jmpbuf-unwind.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agojmpbuf-unwind.h: add NTPL related section
Peter S. Mazinger [Sun, 13 Mar 2011 20:13:27 +0000 (21:13 +0100)]
jmpbuf-unwind.h: add NTPL related section

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoadd jmpbuf-offsets.h and jmpbuf-unwind.h for all archs (LT related)
Peter S. Mazinger [Sun, 13 Mar 2011 19:56:54 +0000 (20:56 +0100)]
add jmpbuf-offsets.h and jmpbuf-unwind.h for all archs (LT related)

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agomove *longjmp related prototypes to setjmp.h
Peter S. Mazinger [Sun, 13 Mar 2011 19:10:13 +0000 (20:10 +0100)]
move *longjmp related prototypes to setjmp.h

Provide common prototypes for __longjmp, __libc_longjmp, __libc_siglongjmp
_longjmp_unwind, __libc_unwind_longjmp in setjmp.h in preparation for use in LT new
Add __longjmp to h8300 and i960
Make common longjmp.c good for NPTL
Guard _longjmp_unwind use in sh's longjmp.c for NPTL (I think sh could use the common one)
Remove unneeded attribute_noreturn, prototype provides it already

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agolibintl.h, clnt_perror.c: add fallback gettext(x) and use it for _(x)
Peter S. Mazinger [Sun, 13 Mar 2011 14:37:48 +0000 (15:37 +0100)]
libintl.h, clnt_perror.c: add fallback gettext(x) and use it for _(x)

clnt_perror.c: change _(x) to N_(x) to allow compile with the change in libintl.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agogetopt[-susv3].c: use libintl's _(x)
Peter S. Mazinger [Sun, 13 Mar 2011 14:36:32 +0000 (15:36 +0100)]
getopt[-susv3].c: use libintl's _(x)

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: remove unneeded guard
Peter S. Mazinger [Sun, 13 Mar 2011 14:35:39 +0000 (15:35 +0100)]
regex_old.c: remove unneeded guard

_LIBC is undefined here, no need to specially guard with __UCLIBC__

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
11 years agoobstack.c: use libintl.h
Peter S. Mazinger [Sun, 13 Mar 2011 14:31:57 +0000 (15:31 +0100)]
obstack.c: use libintl.h

remove gettext workarounds and use libintl.h's _(x)
use strong_alias instead of weak_alias
change how strong_alias and libc_hidden_def are disabled

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