__uc_malloc hooks

Mike Frysinger vapier at gentoo.org
Sat Sep 15 19:07:47 UTC 2007


On Saturday 15 September 2007, Denys Vlasenko wrote:
> I think that libc-symbols.h needs cleanup.
>
> A few things I noticed.
>
> NOT_IN_libc is never defined in uclibc tarball (grepping for
> 'define[^d].*NOT_IN_libc' gives nothing). Yet tons of #ifs check it.
> Is it needed?

we took this file from glibc, so the less we change the better

as for the NOT_IN_libc logic, it may get sprinkled in with things like NPTL 
which have headers split across libc/libpthread ... but in general, the 
header makes sure there is a consistent interface setup.  you know there will 
always be a proper NOT_IN_<lib> or IS_IN_<libc> which makes it easy to work 
with glibc.

> Ugliest part of libc-symbols.h starts here:
>
> /* Handling on non-exported internal names.  We have to do this only
>    for shared code.  */
> #ifdef SHARED
> # define INTUSE(name) name##_internal
> # define INTDEF(name) strong_alias (name, name##_internal)
> # define INTVARDEF(name) \
>   _INTVARDEF (name, name##_internal)
> # if defined HAVE_VISIBILITY_ATTRIBUTE
> #  define _INTVARDEF(name, aliasname) \
>   extern __typeof (name) aliasname __attribute__ ((alias (#name),
> visibility ("hidden"))); # else
> #  define _INTVARDEF(name, aliasname) \
>   extern __typeof (name) aliasname __attribute__ ((alias (#name)));
> # endif
> # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
> # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
> #else
> # define INTUSE(name) name
> # define INTDEF(name)
> # define INTVARDEF(name)
> # define INTDEF2(name, newname)
> # define INTVARDEF2(name, newname)
> #endif
>
>
> INTUSE: one user (libc/misc/regex/regex_internal.h)
> INT[VAR]DEF[2]: no users
> worth removing?

these INT defs are for creating internal variables to be shared across 
files ... they may get utilized in the ldso and/or libc.  or maybe not.  it'd 
have to dig around a bit to see where they would/wouldnt make sense for us.

> Directly after that libc-symbols.h contains libc_hidden_XXX land.
> I do think that libc_hidden_def/libc_hidden_proto macros need renaming.

renaming to what ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20070915/f39155e1/attachment-0002.pgp 


More information about the uClibc mailing list