curl-library
Re: Libcurl Help required!
Date: Tue, 16 Apr 2002 16:27:40 +0000
Daniel Stenberg wrote:
> char major[128];
>
> Now how can this be wrong? Can you process-only this file and see what on
> earth it tries to do?
I bet the compiler assumes K&R syntax, and therefore expects the
declaration of the arguments, and instead finds the declaration of
local variables.
In K&R, functions must look like this:
int MyFunction(firstArgument, secondArgument)
int firstArgument;
char *secondArgument;
{
/* The function body goes here */
}
> > "../../lib/formdata.c", line 931: va_start: argument mismatch
>
> Hm, does this compiler require "old style" va_arg usage?
Definitely an K&R compiler (where va_start only has one argument).
> > Is it possible to build libcurl on solaris native compiler (cc)?????
>
> I used to think it was, but with this output I guess we can say that it
> doesn't. These problems should be possible to correct though, as I would
> really like curl to build properly just like that...
Before venturing down the road of K&R compatibility it may be worthwhile
to investigate whether the compiler supports ANSI C, or another ANSI C
compiler (e.g. gcc or Sun Workshop) is available. K&R was preceeded by
ANSI C back in 1989, and there aren't many K&R compilers left.
If libcurl should support K&R syntax, you should be aware that it is
a major, albeit largely trivial, task to make source code compile on
both K&R and ANSI C compilers (I did this recently on the trio project).
Useful information about the differences can be found at
http://docs.sun.com/htmlcoll/coll.33.7/iso-8859-1/CUG/tguide.html
Received on 2002-04-16