cURL / Mailing Lists / curl-library / Single Mail

curl-library

[OFF-TOPIC] need to redeclare a function

From: Guenter Knauf <eflash_at_gmx.net>
Date: Thu, 12 Jul 2007 16:01:28 +0200

Hi,
I know - here's not a generic C help forum, but since here are very good hackers hanging arounf with much experience with ugly platforms I thought I give it a try....

I've the problem that in a Novell-own header netware.h there's with newer SDKs a declaration:
extern void *RunningProcess;
I believe this declaration is wrong, but the NDK developers dont want to change it...

further more there exists an OpenSSL port which was done before the header got this declaration;
and this one contains due formerly lack of a declaration in the source file:

extern long RunningProcess;

now if I make a short test sample which makes same usage of RunningProcess as what OpenSSL does:

extern long RunningProcess;
int main (void) {
        unsigned long l;

        l = RunningProcess;
        printf("RunningProcess: %ld\n", l);
        return (0);
}

I get this:
### mwccnlm Compiler:
# File: tstrdef.c
# ------------------
# 12: extern long RunningProcess;
# Error: ^
# identifier 'RunningProcess' redeclared
# was declared as: 'void *'
# now declared as: 'long'
### mwccnlm Compiler:
# 21: l = RunningProcess;
# Error: ^
# illegal implicit conversion from 'void *' to
# 'unsigned long'

also something like:

#undef RunningProcess
extern long RunningProcess;

doesnt help.....

anybody a good idea how I can overcome this issue (but I still need the declaration for older NDKs!) ??

any hints appreciated!

greets, Guen.
Received on 2007-07-12