From: Jarkko Hietaniemi Date: Thu, 10 Aug 2006 09:00:44 +0000 (+0300) Subject: g++: gethostbyaddr, and more Tru64 defines X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1d0eb99ac8ec0dfd859e9def067c632124d58343;p=p5sagit%2Fp5-mst-13.2.git g++: gethostbyaddr, and more Tru64 defines Message-ID: <44DACB8C.1080708@iki.fi> p4raw-id: //depot/perl@28689 --- diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 92cb1c3..c0f2bfc 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -161,9 +161,10 @@ esac # Be nauseatingly ANSI ccflags="$ccflags $_ccflags_strict_ansi" -# g++ needs -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD to get much use of . +# g++ needs a lot of definitions to see the same set of +# prototypes from et alia as cxx/cc see. case "$cc" in -*g++*) ccflags="$ccflags -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD" ;; +*g++*) ccflags="$ccflags -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD -D_POSIX_C_SOURCE=199309L -D_POSIX_PII_SOCKET" ;; esac # for gcc the Configure knows about the -fpic: diff --git a/pp_sys.c b/pp_sys.c index 9068b0e..a7c9414 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -4651,7 +4651,7 @@ PP(pp_ghostent) STRLEN addrlen; Netdb_host_t addr = (Netdb_host_t) SvPVbyte(addrsv, addrlen); - hent = PerlSock_gethostbyaddr((const void*)addr, (Netdb_hlen_t) addrlen, addrtype); + hent = PerlSock_gethostbyaddr((const char*)addr, (Netdb_hlen_t) addrlen, addrtype); #else DIE(aTHX_ PL_no_sock_func, "gethostbyaddr"); #endif