cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Rick Jones <rick_jones2_at_hp.com>
Date: Tue, 11 Mar 2003 17:27:06 -0800

i've been mucking about with CFLAGS="-D_XOPEN_SOURCE_EXTENDED" and got
an undefined symbol for htons. on hp-ux when _XOPEN.. is defined,
netinet/in.h does not provide htons et al, and one has to include
arpa/inet.h.

It looks like three files use htons - url.c, connect.c, and a test file
./tests/server/sws.c

The first two have conditional includes of arpa/inet.h, but the latter
only includes netinet/in.h and so with -D_XOPEN_... to get the socklen_t
stuff, it loses the htons and gets an unsat... it didn't look like that
coe was setup to get the HAVE_* stuff, so I did this mod to get it to
compile:

#include <netinet/in.h>
#ifdef _XOPEN_SOURCE_EXTENDED
#include <arpa/inet.h>
#endif
#include <netdb.h>

and all seems well - of course, now there are a whole bunch of other
warnings for ftp.c and such - but they don't include the socket calls,
they are for other curl calls.

rick jones

-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...
-------------------------------------------------------
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-12