Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
1410c222
Commit
1410c222
authored
Apr 21, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: Additional constants, some type corrections.
From-SVN: r186655
parent
b7532479
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
7 deletions
+95
-7
libgo/config.h.in
+33
-0
libgo/configure
+2
-2
libgo/configure.ac
+2
-2
libgo/go/syscall/libcall_linux.go
+1
-1
libgo/go/syscall/libcall_posix.go
+1
-1
libgo/mksysinfo.sh
+56
-1
No files found.
libgo/config.h.in
View file @
1410c222
...
@@ -48,6 +48,15 @@
...
@@ -48,6 +48,15 @@
/* Define to 1 if you have the <linux/filter.h> header file. */
/* Define to 1 if you have the <linux/filter.h> header file. */
#undef HAVE_LINUX_FILTER_H
#undef HAVE_LINUX_FILTER_H
/* Define to 1 if you have the <linux/if_addr.h> header file. */
#undef HAVE_LINUX_IF_ADDR_H
/* Define to 1 if you have the <linux/if_ether.h> header file. */
#undef HAVE_LINUX_IF_ETHER_H
/* Define to 1 if you have the <linux/if_tun.h> header file. */
#undef HAVE_LINUX_IF_TUN_H
/* Define to 1 if you have the <linux/netlink.h> header file. */
/* Define to 1 if you have the <linux/netlink.h> header file. */
#undef HAVE_LINUX_NETLINK_H
#undef HAVE_LINUX_NETLINK_H
...
@@ -75,12 +84,30 @@
...
@@ -75,12 +84,30 @@
/* Define to 1 if you have the `mknodat' function. */
/* Define to 1 if you have the `mknodat' function. */
#undef HAVE_MKNODAT
#undef HAVE_MKNODAT
/* Define to 1 if you have the <netinet/if_ether.h> header file. */
#undef HAVE_NETINET_IF_ETHER_H
/* Define to 1 if you have the <netinet/in_syst.h> header file. */
#undef HAVE_NETINET_IN_SYST_H
/* Define to 1 if you have the <netinet/ip.h> header file. */
#undef HAVE_NETINET_IP_H
/* Define to 1 if you have the <netinet/ip_mroute.h> header file. */
#undef HAVE_NETINET_IP_MROUTE_H
/* Define to 1 if you have the <netpacket/packet.h> header file. */
#undef HAVE_NETPACKET_PACKET_H
/* Define to 1 if you have the <net/if_arp.h> header file. */
/* Define to 1 if you have the <net/if_arp.h> header file. */
#undef HAVE_NET_IF_ARP_H
#undef HAVE_NET_IF_ARP_H
/* Define to 1 if you have the <net/if.h> header file. */
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
#undef HAVE_NET_IF_H
/* Define to 1 if you have the <net/route.h> header file. */
#undef HAVE_NET_ROUTE_H
/* Define to 1 if the system has the type `off64_t'. */
/* Define to 1 if the system has the type `off64_t'. */
#undef HAVE_OFF64_T
#undef HAVE_OFF64_T
...
@@ -145,6 +172,12 @@
...
@@ -145,6 +172,12 @@
/* Define to 1 if you have the <sys/epoll.h> header file. */
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H
#undef HAVE_SYS_EPOLL_H
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/mman.h> header file. */
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
#undef HAVE_SYS_MMAN_H
...
...
libgo/configure
View file @
1410c222
...
@@ -14508,7 +14508,7 @@ no)
...
@@ -14508,7 +14508,7 @@ no)
;;
;;
esac
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 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/ether.h linux/reboot
.h
for
ac_header
in
sys/
file.h sys/mman.h syscall.h sys/epoll.h sys/inotify.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 net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether
.h
do
:
do
:
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
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
"
ac_fn_c_check_header_mongrel
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"
$ac_includes_default
"
...
@@ -14523,7 +14523,7 @@ fi
...
@@ -14523,7 +14523,7 @@ fi
done
done
for
ac_header
in
linux/filter.h linux/netlink.h linux/rtnetlink.h
for
ac_header
in
linux/filter.h linux/
if_addr.h linux/if_ether.h linux/if_tun.h linux/
netlink.h linux/rtnetlink.h
do
:
do
:
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
ac_fn_c_check_header_compile
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"#ifdef HAVE_SYS_SOCKET_H
ac_fn_c_check_header_compile
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"#ifdef HAVE_SYS_SOCKET_H
...
...
libgo/configure.ac
View file @
1410c222
...
@@ -453,9 +453,9 @@ no)
...
@@ -453,9 +453,9 @@ no)
;;
;;
esac
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 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/ether.h linux/reboot
.h)
AC_CHECK_HEADERS(sys/
file.h sys/mman.h syscall.h sys/epoll.h sys/inotify.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 net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether
.h)
AC_CHECK_HEADERS([linux/filter.h linux/netlink.h linux/rtnetlink.h], [], [],
AC_CHECK_HEADERS([linux/filter.h linux/
if_addr.h linux/if_ether.h linux/if_tun.h linux/
netlink.h linux/rtnetlink.h], [], [],
[#ifdef HAVE_SYS_SOCKET_H
[#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#include <sys/socket.h>
#endif
#endif
...
...
libgo/go/syscall/libcall_linux.go
View file @
1410c222
...
@@ -335,7 +335,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
...
@@ -335,7 +335,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//tee(rfd int, wfd int, len Size_t, flags uint) Ssize_t
//tee(rfd int, wfd int, len Size_t, flags uint) Ssize_t
func
Tgkill
(
tgid
,
tid
,
sig
Signal
)
error
{
func
Tgkill
(
tgid
,
tid
int
,
sig
Signal
)
error
{
r1
,
_
,
errno
:=
Syscall
(
SYS_TGKILL
,
uintptr
(
tgid
),
uintptr
(
tid
),
uintptr
(
sig
))
r1
,
_
,
errno
:=
Syscall
(
SYS_TGKILL
,
uintptr
(
tgid
),
uintptr
(
tid
),
uintptr
(
sig
))
if
r1
<
0
{
if
r1
<
0
{
return
errno
return
errno
...
...
libgo/go/syscall/libcall_posix.go
View file @
1410c222
...
@@ -268,7 +268,7 @@ func Gettimeofday(tv *Timeval) (err error) {
...
@@ -268,7 +268,7 @@ func Gettimeofday(tv *Timeval) (err error) {
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error)
//mknod(path *byte, mode Mode_t, dev _dev_t) int
//mknod(path *byte, mode Mode_t, dev _dev_t) int
//sys Mount(source string, target string, fstype string, flags
int
, data string) (err error)
//sys Mount(source string, target string, fstype string, flags
uintptr
, data string) (err error)
//mount(source *byte, target *byte, fstype *byte, flags _C_long, data *byte) int
//mount(source *byte, target *byte, fstype *byte, flags _C_long, data *byte) int
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
...
...
libgo/mksysinfo.sh
View file @
1410c222
...
@@ -40,6 +40,18 @@ cat > sysinfo.c <<EOF
...
@@ -40,6 +40,18 @@ cat > sysinfo.c <<EOF
#include <sys/ttold.h>
#include <sys/ttold.h>
#endif
#endif
#include <netinet/tcp.h>
#include <netinet/tcp.h>
#if defined(HAVE_NETINET_IN_SYSTM_H)
#include <netinet/in_systm.h>
#endif
#if defined(HAVE_NETINET_IP_H)
#include <netinet/ip.h>
#endif
#if defined(HAVE_NETINET_IP_MROUTE_H)
#include <netinet/ip_mroute.h>
#endif
#if defined(HAVE_NETINET_IF_ETHER_H)
#include <netinet/if_ether.h>
#endif
#include <signal.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <termios.h>
...
@@ -52,6 +64,9 @@ cat > sysinfo.c <<EOF
...
@@ -52,6 +64,9 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_SYS_EPOLL_H)
#if defined(HAVE_SYS_EPOLL_H)
#include <sys/epoll.h>
#include <sys/epoll.h>
#endif
#endif
#if defined(HAVE_SYS_FILE_H)
#include <sys/file.h>
#endif
#if defined(HAVE_SYS_MMAN_H)
#if defined(HAVE_SYS_MMAN_H)
#include <sys/mman.h>
#include <sys/mman.h>
#endif
#endif
...
@@ -85,6 +100,15 @@ cat > sysinfo.c <<EOF
...
@@ -85,6 +100,15 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_LINUX_FILTER_H)
#if defined(HAVE_LINUX_FILTER_H)
#include <linux/filter.h>
#include <linux/filter.h>
#endif
#endif
#if defined(HAVE_LINUX_IF_ADDR_H)
#include <linux/if_addr.h>
#endif
#if defined(HAVE_LINUX_IF_ETHER_H)
#include <linux/if_ether.h>
#endif
#if defined(HAVE_LINUX_IF_TUN_H)
#include <linux/if_tun.h>
#endif
#if defined(HAVE_LINUX_NETLINK_H)
#if defined(HAVE_LINUX_NETLINK_H)
#include <linux/netlink.h>
#include <linux/netlink.h>
#endif
#endif
...
@@ -97,6 +121,12 @@ cat > sysinfo.c <<EOF
...
@@ -97,6 +121,12 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_NET_IF_ARP_H)
#if defined(HAVE_NET_IF_ARP_H)
#include <net/if_arp.h>
#include <net/if_arp.h>
#endif
#endif
#if defined(HAVE_NET_ROUTE_H)
#include <net/route.h>
#endif
#if defined (HAVE_NETPACKET_PACKET_H)
#include <netpacket/packet.h>
#endif
#if defined(HAVE_SYS_MOUNT_H)
#if defined(HAVE_SYS_MOUNT_H)
#include <sys/mount.h>
#include <sys/mount.h>
#endif
#endif
...
@@ -124,6 +154,9 @@ cat > sysinfo.c <<EOF
...
@@ -124,6 +154,9 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_LINUX_REBOOT_H)
#if defined(HAVE_LINUX_REBOOT_H)
#include <linux/reboot.h>
#include <linux/reboot.h>
#endif
#endif
#if defined(HAVE_SYS_INOTIFY_H)
#include <sys/inotify.h>
#endif
/* Constants that may only be defined as expressions on some systems,
/* Constants that may only be defined as expressions on some systems,
expressions too complex for -fdump-go-spec to handle. These are
expressions too complex for -fdump-go-spec to handle. These are
...
@@ -199,6 +232,8 @@ grep '^const _MAP_' gen-sysinfo.go | \
...
@@ -199,6 +232,8 @@ grep '^const _MAP_' gen-sysinfo.go | \
sed
-e
's/^\(const \)_\(MAP_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(MAP_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _MADV_'
gen-sysinfo.go |
\
grep
'^const _MADV_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(MADV_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(MADV_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _MCL_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(MCL_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# Process status constants.
# Process status constants.
grep
'^const _W'
gen-sysinfo.go |
grep
'^const _W'
gen-sysinfo.go |
...
@@ -700,7 +735,7 @@ grep '^type _rtmsg ' gen-sysinfo.go | \
...
@@ -700,7 +735,7 @@ grep '^type _rtmsg ' gen-sysinfo.go | \
-e
's/rtm_src_len/Src_len/'
\
-e
's/rtm_src_len/Src_len/'
\
-e
's/rtm_tos/Tos/'
\
-e
's/rtm_tos/Tos/'
\
-e
's/rtm_table/Table/'
\
-e
's/rtm_table/Table/'
\
-e
's/rtm_protocol/Pro
cot
ol/'
\
-e
's/rtm_protocol/Pro
toc
ol/'
\
-e
's/rtm_scope/Scope/'
\
-e
's/rtm_scope/Scope/'
\
-e
's/rtm_type/Type/'
\
-e
's/rtm_type/Type/'
\
-e
's/rtm_flags/Flags/'
\
-e
's/rtm_flags/Flags/'
\
...
@@ -718,6 +753,8 @@ grep '^type _rtgenmsg ' gen-sysinfo.go | \
...
@@ -718,6 +753,8 @@ grep '^type _rtgenmsg ' gen-sysinfo.go | \
>>
${
OUT
}
>>
${
OUT
}
# The routing message flags.
# The routing message flags.
grep
'^const _RT_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(RT_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _RTA'
gen-sysinfo.go |
\
grep
'^const _RTA'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(RTA[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(RTA[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _RTF'
gen-sysinfo.go |
\
grep
'^const _RTF'
gen-sysinfo.go |
\
...
@@ -726,6 +763,10 @@ grep '^const _RTCF' gen-sysinfo.go | \
...
@@ -726,6 +763,10 @@ grep '^const _RTCF' gen-sysinfo.go | \
sed
-e
's/^\(const \)_\(RTCF[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(RTCF[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _RTM'
gen-sysinfo.go |
\
grep
'^const _RTM'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(RTM[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(RTM[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _RTN'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(RTN[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _RTPROT'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(RTPROT[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The size of the rtgenmsg struct.
# The size of the rtgenmsg struct.
if
grep
'type RtGenmsg '
${
OUT
}
>
/dev/null 2>&1
;
then
if
grep
'type RtGenmsg '
${
OUT
}
>
/dev/null 2>&1
;
then
...
@@ -818,6 +859,8 @@ for n in IGNBRK BRKINT IGNPAR PARMRK INPCK ISTRIP INLCR IGNCR ICRNL IUCLC \
...
@@ -818,6 +859,8 @@ for n in IGNBRK BRKINT IGNPAR PARMRK INPCK ISTRIP INLCR IGNCR ICRNL IUCLC \
done
done
# The mount flags
# The mount flags
grep
'^const _MNT_'
gen-sysinfo.go |
sed
-e
's/^\(const \)_\(MNT_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
grep
'^const _MS_'
gen-sysinfo.go |
grep
'^const _MS_'
gen-sysinfo.go |
sed
-e
's/^\(const \)_\(MS_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(MS_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
...
@@ -932,6 +975,10 @@ grep '^type _utimbuf ' gen-sysinfo.go | \
...
@@ -932,6 +975,10 @@ grep '^type _utimbuf ' gen-sysinfo.go | \
-e
's/modtime/Modtime/'
\
-e
's/modtime/Modtime/'
\
>>
${
OUT
}
>>
${
OUT
}
# The LOCK flags for flock.
grep
'^const _LOCK_'
gen-sysinfo.go |
sed
-e
's/^\(const \)_\(LOCK_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The GNU/Linux LINUX_REBOOT flags.
# The GNU/Linux LINUX_REBOOT flags.
grep
'^const _LINUX_REBOOT_'
gen-sysinfo.go |
grep
'^const _LINUX_REBOOT_'
gen-sysinfo.go |
sed
-e
's/^\(const \)_\(LINUX_REBOOT_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(LINUX_REBOOT_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
...
@@ -957,6 +1004,14 @@ grep '^type _sock_fprog ' gen-sysinfo.go | \
...
@@ -957,6 +1004,14 @@ grep '^type _sock_fprog ' gen-sysinfo.go | \
grep
'^const _BPF_'
gen-sysinfo.go |
\
grep
'^const _BPF_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(BPF_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
sed
-e
's/^\(const \)_\(BPF_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The GNU/Linux netlink flags.
grep
'^const _NETLINK_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(NETLINK_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The GNU/Linux packet socket flags.
grep
'^const _PACKET_'
gen-sysinfo.go |
\
sed
-e
's/^\(const \)_\(PACKET_[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The Solaris 11 Update 1 _zone_net_addr_t struct.
# The Solaris 11 Update 1 _zone_net_addr_t struct.
grep
'^type _zone_net_addr_t '
gen-sysinfo.go |
\
grep
'^type _zone_net_addr_t '
gen-sysinfo.go |
\
sed
-e
's/_in6_addr/[16]byte/'
\
sed
-e
's/_in6_addr/[16]byte/'
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment