curl-library
Re: [OFF-TOPIC] need to redeclare a function
Date: Thu, 12 Jul 2007 22:25:20 +0200
Hi,
> On Thu, Jul 12, 2007 at 06:39:55PM +0200, Patrick Monnerat wrote:
>> If the netware.h inclusion generates code using its own definition, then
>> you will have a link error on symbol RunningProcessDummy... In this
>> case, I do not have any other clever idea for your problem !
> You will probably still have a problem while linking, because both OpenSSL
> and Netware will be exporting a RunningProcess and the linker can link
> your
> code to only one of them. You might still be able to make it work by
> introducing load-order dependencies, or statically linking to one of the
> libraries and hiding unneeded global exports, or linking the two libraries
> with the -Bsymbolic flag in conjunction with one of these other methods,
> or doing an incremental link of your app with one of the libraries before
> a full link. In the worst-case scenario you can always edit the OpenSSL
> source to rename that definition :^)
thanks for all your suggestions!
Editing the OpenSSL sources isnt the issue since I'm anyway working on a big fat patch which I want to sell soon to the OpenSSL folks.....
http://svwe10.itex.at/downloads/openssl-0.9.8e.diff
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...
thanks, Guen.
Received on 2007-07-12