cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [OFF-TOPIC] need to redeclare a function

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 12 Jul 2007 14:26:44 -0700

On Thu, Jul 12, 2007 at 10:25:20PM +0200, Guenter Knauf wrote:
> I think I have now found a good solution which seems to work:
>
> #ifndef __netware_h__
> extern void *RunningProcess; /* declare here same as found in newer NDKs */
> #endif
>
> int main (void) {
> unsigned long l;
>
> /* need to cast the void* to unsigned long here */
> l = (unsigned long)RunningProcess;
> printf("RunningProcess: %lX\n", l);
>
> return (0);
> }
>
> that seems to compile fine, and test seems to give same result as before...

Are you sure you aren't just getting lucky? I don't have the ELF run-time
binding rules handy, but it's possible that the Netware library is also
going to be using OpenSSL's RunningProcess instead of its own (assuming
it uses it internally). Changing your link order might also make your
test app start to fail.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-07-12