diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-10 05:15:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-10 05:15:26 +0000 |
commit | 1d88b533f61a8e86a0609fd906a86fecfadc6d1a (patch) | |
tree | d1dc0050555555f4da3069683acbfdbd038a615c | |
parent | 095a0503139d0a302aafb5098d9481c2b47c10fc (diff) | |
download | perl-1d88b533f61a8e86a0609fd906a86fecfadc6d1a.tar.gz |
Misc tiny tweaks from Sarathy, good for threaded builds.
p4raw-id: //depot/perl@15141
-rw-r--r-- | ext/Socket/Socket.xs | 5 | ||||
-rw-r--r-- | hints/linux.sh | 2 | ||||
-rw-r--r-- | pp_sys.c | 24 |
3 files changed, 16 insertions, 15 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 79e1dfd22a..d844775e4f 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -263,8 +263,9 @@ inet_ntoa(ip_address_sv) addrlen, sizeof(addr)); /* We could use inet_ntoa() but that is broken * in HP-UX + GCC + 64bitint (returns "0.0.0.0"), - * so let's use this sprintf() workaround everywhere. */ - New(1138, addr_str, 4 * 3 + 3 + 1, char); + * so let's use this sprintf() workaround everywhere. + * This is also more threadsafe than using inet_ntoa(). */ + New(1138, addr_str, 4 * 3 + 3 + 1, char); /* IPv6? */ sprintf(addr_str, "%d.%d.%d.%d", ((addr.s_addr >> 24) & 0xFF), ((addr.s_addr >> 16) & 0xFF), diff --git a/hints/linux.sh b/hints/linux.sh index 971e491536..90bcb78c58 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -249,7 +249,7 @@ esac cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) - ccflags="-D_REENTRANT $ccflags" + ccflags="-D_GNU_SOURCE -D_REENTRANT $ccflags" set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` shift libswanted="$*" @@ -4618,9 +4618,9 @@ PP(pp_ghostent) register char **elem; register SV *sv; #ifndef HAS_GETHOST_PROTOS /* XXX Do we need individual probes? */ - struct hostent *PerlSock_gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int); - struct hostent *PerlSock_gethostbyname(Netdb_name_t); - struct hostent *PerlSock_gethostent(void); + struct hostent *gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int); + struct hostent *gethostbyname(Netdb_name_t); + struct hostent *gethostent(void); #endif struct hostent *hent; unsigned long len; @@ -4727,9 +4727,9 @@ PP(pp_gnetent) register char **elem; register SV *sv; #ifndef HAS_GETNET_PROTOS /* XXX Do we need individual probes? */ - struct netent *PerlSock_getnetbyaddr(Netdb_net_t, int); - struct netent *PerlSock_getnetbyname(Netdb_name_t); - struct netent *PerlSock_getnetent(void); + struct netent *getnetbyaddr(Netdb_net_t, int); + struct netent *getnetbyname(Netdb_name_t); + struct netent *getnetent(void); #endif struct netent *nent; STRLEN n_a; @@ -4815,9 +4815,9 @@ PP(pp_gprotoent) register char **elem; register SV *sv; #ifndef HAS_GETPROTO_PROTOS /* XXX Do we need individual probes? */ - struct protoent *PerlSock_getprotobyname(Netdb_name_t); - struct protoent *PerlSock_getprotobynumber(int); - struct protoent *PerlSock_getprotoent(void); + struct protoent *getprotobyname(Netdb_name_t); + struct protoent *getprotobynumber(int); + struct protoent *getprotoent(void); #endif struct protoent *pent; STRLEN n_a; @@ -4898,9 +4898,9 @@ PP(pp_gservent) register char **elem; register SV *sv; #ifndef HAS_GETSERV_PROTOS /* XXX Do we need individual probes? */ - struct servent *PerlSock_getservbyname(Netdb_name_t, Netdb_name_t); - struct servent *PerlSock_getservbyport(int, Netdb_name_t); - struct servent *PerlSock_getservent(void); + struct servent *getservbyname(Netdb_name_t, Netdb_name_t); + struct servent *getservbyport(int, Netdb_name_t); + struct servent *getservent(void); #endif struct servent *sent; STRLEN n_a; |