aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-04-03 19:42:24 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-04-03 19:42:24 +0000
commit8db6380aa7009f4c98073e8a61f7b8915d03ed4c (patch)
tree23c871d18a24bcac380bd21b85b3786ab4e14fe4 /libgo
parent572a2f688699265e32ef87f99317dee5439d0c1a (diff)
downloadgcc-8db6380aa7009f4c98073e8a61f7b8915d03ed4c.zip
gcc-8db6380aa7009f4c98073e8a61f7b8915d03ed4c.tar.gz
gcc-8db6380aa7009f4c98073e8a61f7b8915d03ed4c.tar.bz2
mksysinfo.sh: Add some more networking constants.
From-SVN: r186114
Diffstat (limited to 'libgo')
-rw-r--r--libgo/config.h.in3
-rwxr-xr-xlibgo/configure2
-rw-r--r--libgo/configure.ac2
-rwxr-xr-xlibgo/mksysinfo.sh13
4 files changed, 17 insertions, 3 deletions
diff --git a/libgo/config.h.in b/libgo/config.h.in
index ccb79e1..aea6ac1 100644
--- a/libgo/config.h.in
+++ b/libgo/config.h.in
@@ -72,6 +72,9 @@
/* Define to 1 if you have the `mknodat' function. */
#undef HAVE_MKNODAT
+/* Define to 1 if you have the <net/if_arp.h> header file. */
+#undef HAVE_NET_IF_ARP_H
+
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
diff --git a/libgo/configure b/libgo/configure
index d1c17f1..34125ec 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14508,7 +14508,7 @@ no)
;;
esac
-for ac_header in sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/reboot.h
+for ac_header in sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/reboot.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 63c5faf..b47d17d 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -453,7 +453,7 @@ no)
;;
esac
-AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/reboot.h)
+AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/syscall.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/if.h net/if_arp.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/reboot.h)
AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [],
[#ifdef HAVE_SYS_SOCKET_H
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 5b04e9f..86c2bd7e 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -94,6 +94,9 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_NET_IF_H)
#include <net/if.h>
#endif
+#if defined(HAVE_NET_IF_ARP_H)
+#include <net/if_arp.h>
+#endif
#if defined(HAVE_SYS_MOUNT_H)
#include <sys/mount.h>
#endif
@@ -211,7 +214,7 @@ if grep '^const ___WALL = ' gen-sysinfo.go >/dev/null 2>&1 \
fi
# Networking constants.
-egrep '^const _(AF|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |
+egrep '^const _(AF|ARPHRD|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |
sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
grep '^const _SOMAXCONN' gen-sysinfo.go |
sed -e 's/^\(const \)_\(SOMAXCONN[^= ]*\)\(.*\)$/\1\2 = _\2/' \
@@ -710,6 +713,10 @@ grep '^type _rtgenmsg ' gen-sysinfo.go | \
# The routing message flags.
grep '^const _RTA' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(RTA[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+grep '^const _RTF' gen-sysinfo.go | \
+ sed -e 's/^\(const \)_\(RTF[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+grep '^const _RTCF' gen-sysinfo.go | \
+ sed -e 's/^\(const \)_\(RTCF[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
grep '^const _RTM' gen-sysinfo.go | \
sed -e 's/^\(const \)_\(RTM[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
@@ -938,6 +945,10 @@ grep '^type _sock_fprog ' gen-sysinfo.go | \
-e 's/_sock_filter/SockFilter/' \
>> ${OUT}
+# The GNU/Linux filter flags.
+grep '^const _BPF_' gen-sysinfo.go | \
+ sed -e 's/^\(const \)_\(BPF_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+
# The Solaris 11 Update 1 _zone_net_addr_t struct.
grep '^type _zone_net_addr_t ' gen-sysinfo.go | \
sed -e 's/_in6_addr/[16]byte/' \