This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: __libc symbols
- From: "Loic Domaigne" <loic-dev at gmx dot net>
- To: Roland McGrath <roland at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 6 Dec 2004 17:02:53 +0100 (MET)
- Subject: Re: __libc symbols
- References: <200412032127.iB3LRZEb005771@magilla.sf.frob.com>
Hi Roland!
> Don't rely on internals. If you want wrapper functions that change
> cancellation handling, then write them using the POSIX interface.
As an associated member of the Open Group I can only agree with you.
Unfortunately, I do not see how I can proceed differently.
The situtation I am faced right now is as follows:
1- Some well known functions defined in POSIX as a different cancellation
semantic in DCE.
2- When the user link the DCE threads library, then the DCE semantic should
apply for cancellation, not the POSIX one.
3- One must take into account that the user won't necessarily include a
special header file which would #define the wrappers functions
The solution, used so far, was:
- to define a wrapper which called the corresponding internal __libc_*
function.
- to define a strong alias between the wrapper and the POSIX function.
AFAICS, that scheme can't work anymore. Because the __libc_* symbols are now
local. Second, some POSIX functions, like /pause()/ do not seems to have any
other entry point in the glibc than the standard interface.
The current /pause()/ wrappers looks like:
- block cancellation
- call __libc_pause
- unblock cancellation
That don't work anymore. What can I do? Should I code myselves the
/__libc_pause()/ with POSIX functions? Is it what you suggest? Or is there
another way to obtain the above wrapper with the new glibc?
Any advise would be appreciate,
With Regards,
Loic.
P.S: I bet with my collegue that somebody would come with a sentence similar
to the 'don't use glibc internal' ;-)
--
--
// Sender address goes to /dev/null (!!)
// Use my 32/64 bits, ANSI C89, compliant email-address instead:
unsigned y[]=
{0,34432,26811,16721,41866,63119,61007,48155,26147,10986};
void x(z){putchar(z);}; unsigned t;
main(i){if(i<10){t=(y[i]*47560)%65521;x(t>>8);x(t&255);main(++i);}}
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!