old C syntax problem

hey all
i want to build zlib with g++
the problem is that zlib contain old c code, like this:

int func1(arg1,arg2)
int arg1;
int arg2;
{
dosomething();
}

as you can see the problem is with the argument list
g++ can't handle this syntax.
gcc does.

my question is
is there a g++ switch that enable this syntax ?

thanks in advanced.
I don't know where you got that code, but the zlib source is not like that and compiles fine in all modern compilers.

zlib home page: http://www.zlib.net/
source download: http://zlib.net/zlib128.zip
In case it helps, the g++ switch to compile a C program is -x c
Disch, you're probebly wrong
check out file adler32.c line 65 for example

Cubbi - you made it man. thank you very very very much.
you've just solved me a very long time problem.
Last edited on
I stand corrected! My apologies!

Strange that I didn't run into this problem when I compiled zlib.
Topic archived. No new replies allowed.