mirror of git://gcc.gnu.org/git/gcc.git
libgo: use Solaris sendfile lib, fix Solaris _in6_addr_t fields
Before Solaris 12 the sendfile function is found in -lsendfile, so look
for it there.
Solaris 12 adds some more types that use _in6_addr_t, that need to be
edited in mksysinfo.
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/16779
From-SVN: r230132
This commit is contained in:
parent
732ea6d11d
commit
88cf4de8b7
|
|
@ -1,4 +1,4 @@
|
||||||
0c07751d139ef90a43ef7f299f925622a8792a9f
|
e3aef41ce0c5be81e2589e60d9cb0db1516e9e2d
|
||||||
|
|
||||||
The first line of this file holds the git revision number of the last
|
The first line of this file holds the git revision number of the last
|
||||||
merge done from the gofrontend repository.
|
merge done from the gofrontend repository.
|
||||||
|
|
|
||||||
|
|
@ -14249,6 +14249,46 @@ fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset ac_cv_func_gethostbyname
|
unset ac_cv_func_gethostbyname
|
||||||
|
ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile"
|
||||||
|
if test "x$ac_cv_func_sendfile" = x""yes; then :
|
||||||
|
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsendfile" >&5
|
||||||
|
$as_echo_n "checking for main in -lsendfile... " >&6; }
|
||||||
|
if test "${ac_cv_lib_sendfile_main+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lsendfile $LIBS"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return main ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_lib_sendfile_main=yes
|
||||||
|
else
|
||||||
|
ac_cv_lib_sendfile_main=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_main" >&5
|
||||||
|
$as_echo "$ac_cv_lib_sendfile_main" >&6; }
|
||||||
|
if test "x$ac_cv_lib_sendfile_main" = x""yes; then :
|
||||||
|
libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
LIBS=$libgo_old_libs
|
LIBS=$libgo_old_libs
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -473,6 +473,9 @@ AC_CACHE_CHECK([for socket libraries], libgo_cv_lib_sockets,
|
||||||
[AC_CHECK_LIB(nsl, main,
|
[AC_CHECK_LIB(nsl, main,
|
||||||
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
|
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lnsl"])])
|
||||||
unset ac_cv_func_gethostbyname
|
unset ac_cv_func_gethostbyname
|
||||||
|
AC_CHECK_FUNC(sendfile, ,
|
||||||
|
[AC_CHECK_LIB(sendfile, main,
|
||||||
|
[libgo_cv_lib_sockets="$libgo_cv_lib_sockets -lsendfile"])])
|
||||||
LIBS=$libgo_old_libs
|
LIBS=$libgo_old_libs
|
||||||
])
|
])
|
||||||
NET_LIBS="$libgo_cv_lib_sockets"
|
NET_LIBS="$libgo_cv_lib_sockets"
|
||||||
|
|
|
||||||
|
|
@ -1488,4 +1488,24 @@ grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
|
||||||
sed -e 's/_in6_addr/[16]byte/' \
|
sed -e 's/_in6_addr/[16]byte/' \
|
||||||
>> ${OUT}
|
>> ${OUT}
|
||||||
|
|
||||||
|
# The Solaris 12 _flow_arp_desc_t struct.
|
||||||
|
grep '^type _flow_arp_desc_t ' gen-sysinfo.go | \
|
||||||
|
sed -e 's/_in6_addr_t/[16]byte/g' \
|
||||||
|
>> ${OUT}
|
||||||
|
|
||||||
|
# The Solaris 12 _flow_l3_desc_t struct.
|
||||||
|
grep '^type _flow_l3_desc_t ' gen-sysinfo.go | \
|
||||||
|
sed -e 's/_in6_addr_t/[16]byte/g' \
|
||||||
|
>> ${OUT}
|
||||||
|
|
||||||
|
# The Solaris 12 _mac_ipaddr_t struct.
|
||||||
|
grep '^type _mac_ipaddr_t ' gen-sysinfo.go | \
|
||||||
|
sed -e 's/_in6_addr_t/[16]byte/g' \
|
||||||
|
>> ${OUT}
|
||||||
|
|
||||||
|
# The Solaris 12 _mactun_info_t struct.
|
||||||
|
grep '^type _mactun_info_t ' gen-sysinfo.go | \
|
||||||
|
sed -e 's/_in6_addr_t/[16]byte/g' \
|
||||||
|
>> ${OUT}
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue