cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl 7.10.4-pre3 on HP-UX using GCC v3.2

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Mar 2003 07:03:18 +0100 (CET)

On Wed, 12 Mar 2003, Rick Jones wrote:

> > And what exactly (again) did you need to do to get the select() and
> > gettimeofday() recognized?
> I bracketed the #include <limits.h> with #ifndef __hpux #endif

> /* System header to define __stub macros and hopefully few prototypes,
> which can conflict with char $ac_func (); below.
> Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
> <limits.h> exists even on freestanding compilers. */
> #ifdef __STDC__
> #ifndef __hpux
> # include <limits.h>
> #endif
> #else
> # include <assert.h>
> #endif

> I'm not quite sure why limits or assert needed to be included in the
> first place. Probably something on some other platform.

I'm very puzzled by this, and I guess I should take this issue over to the
autoconf guys.

These include files are only used when AC_CHECK_FUNCS() is used to check for
a function. Funnily enough, AC_CHECK_LIB() does tests for a function without
that inclusion... I'll try to add a custom secondary check for the cases
where the check fails, and there I'll skip the include file.

I consider these problems the major ones, since these prevent curl from
building properly.

> with no ifdefs. So, the test finds a socklen_t, that is a size_t, but the
> socket calls are initially setup with ints. On the surface that seems a
> bit inconsistent,but I suspect that it was either a) an oversight, or b) a
> desire to avoid warnings in legacy code.

This behavior will make it next to impossible for us to make the curl code
compile without those warnings. I think I'll make a note about this situation
somewhere and just live with this for now.

> cc: "ftp.c", line 641: warning 604: Pointers are not assignment-compatible.^M
> cc: "ftp.c", line 641: warning 563: Argument #1 is not the correct type.^M
> This is:
> result = Curl_GetFTPResponse(&nread, conn, &ftpcode);

Yeps, the Curl_GetFTPResponse() function has since been changed to take a
ssize_t * in its first argument.

> result = Curl_write(conn, sock, (char *)socksreq, (2 + (int)socksreq[1]),
> &written);
> arg five is &written. written is defined as an int:
> int actualread;
> int written;

AAAH, I'm silly. I had applied a patch already that fixed this little issue
and fixed those ints to become 'ssize_t' variables instead!

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Received on 2003-03-13