Reinstate hidden protos for config_{open,close,read}()

Partially reverts "parser_config.[ch]: remove duplicated hidden functions"

There's a namespace collision for config_{open,close,read} functions
between uClibc and Busybox. Callers in uClibc and busybox need to call
their local variants. In case of static linking, both the variants need
to be pulled in the final executable.

Turns out that the existing hidden attribute is not enough for static
linked Busybox where the linker treats these symbols as duplicate and
pulls in only the local (Busybox's own) variants in the final link.
This obviously causes the uClibc callers to crap out at runtime.

This can be fixed by restoring the libc_hidden_proto() annotation
which causes the libc variants to be aliased with __GI_ prefix thus
making both the symbols distinct from linker's perspective.

This issue was found with ARC gcc 4.8 + uClibc trunk.
I can confirm the same thing with ARM uClibc buildroot build (when
switching to uClibc daily snapshot).

All the credit for debugging the issue goes to Anton,Joern and Jeremy -
I simply found the cure :-)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Jeremy Bennett <jeremy.bennett@embecosm.com>
Cc: Joern Rennecke <joern.rennecke@embecosm.com>
Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
ldso/libdl: Also include dl-tls.h for for !SHARED.

On MIPS, several relocations that were original only resolved by the
dynamic linker were reused as static relocations.  Consequently the
macros TLS_DTPREL_VALUE and TLS_TPREL_VALUE defined in
libpthread/nptl/sysdeps/mips/dl-tls.h need to be available even for
!SHARED.

Relevant: http://www.linux-mips.org/wiki/NPTL#History

Original patch by Vincent Wen <wenvincent@gmail.com>:
http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html

When build statically linked applications for MIPS platform,
sometimes the linker fails with following errors:
undefined reference to TLS_DTPREL_VALUE
undefined reference to TLS_TPREL_VALUE
The include of dl-tls.h is only in code guarded by SHARED,
Removing the SHARED compilation option to cover static link too.

Signed-off-by: Vincent Wen <wenvincent90@gmail.com>

Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
eventfd.h: Use new "bits/" scheme for arch-specific flags

As in timerfd.h, eventfd.h needs arch-specific definition files.
alpha, mips and sparc needs separate file, all the other arch
will use common definition.

This problem is already fixed in glibc.

Also sanitize and provide bits for hppa.
Make sure not to install the new bits/eventfd unless eventfd support is
enabled.

Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>