cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Error Compiling Curl

From: Victor <victord_at_paid.com>
Date: Fri, 08 Mar 2002 11:57:43 -0500

> This is still Solaris 2.8 isn't it?

Yes.

> Why don't your include files have a strdup() prototype? That seems very
> strange. My Solaris man page says it is in string.h, and my Solaris
compiles
> never complain on this (and I always build with a lot stricter compiler
flags
> than you did here).

Hmm, here is the stuff from /usr/include/string.h

#if defined(__EXTENSIONS__) || (__STDC__ == 0 && \
                !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
                defined(_XPG4_2)
extern char *strdup(const char *);
#endif

...

#if defined(__EXTENSIONS__) || \
        !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
        defined(_XPG4_2)
extern char *strdup();
#endif

That's what I have in /usr/include/string.h
Is this what you have on your Solaris 8 Box?

> [many strdup()-related warnings cut off]
>
> > formdata.c: In function `curl_formadd':
> > formdata.c:924: `__builtin_va_alist' undeclared (first use in this
function)
>
> Another issue. This is supposed to not happen when we include <stdarg.h>,
as
> that should make the va_* functions "just work".

in /usr/include/stdarg.h

/*
 * Allow global visibility for symbols defined in
 * C++ "std" namespace in <iso/stdarg_iso.h>.
 */
#if __cplusplus >= 199711L
using std::va_list;
#endif

> As they don't, I think it leans towards that you have a problem with your
> include files or your compiler.

Well, include files come from SUNWhea (and I have that installed). So I
guess it could be the compiler.

-rw-r--r-- 1 root bin 1151 Jan 5 2000 stdarg.h
-rw-r--r-- 1 root bin 2900 Jan 5 2000 string.h

What stricter compiler flags do you use? Also, what are your compiler
settings? Do you define special LDFLAGS or CPPFLAGS or CFLAGS ?

My compiler is gcc 3.0.4 that I compiled myself (using gcc 2.95.3) and is
set up with SUN's ld and as. It worked fine for BerkeleyDB4, OpenSSH,
OpenSSL, Postfix, and other software. I am not using any GNU binutil
software, do you think it could be related to that?
Received on 2002-03-08