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
4ac7fcaa
Commit
4ac7fcaa
authored
Apr 01, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libgo: Try to guess the right type for select bits in mksysinfo.
From-SVN: r171858
parent
15a03a11
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
libgo/configure
+1
-1
libgo/configure.ac
+1
-1
libgo/mksysinfo.sh
+11
-0
libgo/syscalls/sysfile_posix.go
+2
-2
No files found.
libgo/configure
View file @
4ac7fcaa
...
@@ -14228,7 +14228,7 @@ no)
...
@@ -14228,7 +14228,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
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
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
"
...
...
libgo/configure.ac
View file @
4ac7fcaa
...
@@ -417,7 +417,7 @@ no)
...
@@ -417,7 +417,7 @@ 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)
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
)
AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
AC_CHECK_FUNCS(srandom random strerror_r strsignal wait4)
AC_CHECK_FUNCS(srandom random strerror_r strsignal wait4)
...
...
libgo/mksysinfo.sh
View file @
4ac7fcaa
...
@@ -73,6 +73,9 @@ cat > sysinfo.c <<EOF
...
@@ -73,6 +73,9 @@ cat > sysinfo.c <<EOF
#if defined(HAVE_SYS_UTSNAME_H)
#if defined(HAVE_SYS_UTSNAME_H)
#include <sys/utsname.h>
#include <sys/utsname.h>
#endif
#endif
#if defined(HAVE_SYS_SELECT_H)
#include <sys/select.h>
#endif
#include <unistd.h>
#include <unistd.h>
EOF
EOF
...
@@ -438,4 +441,12 @@ grep '^type _ip_mreq ' gen-sysinfo.go | \
...
@@ -438,4 +441,12 @@ grep '^type _ip_mreq ' gen-sysinfo.go | \
-e
's/_in_addr/[4]byte/g'
\
-e
's/_in_addr/[4]byte/g'
\
>>
${
OUT
}
>>
${
OUT
}
# Try to guess the type to use for fd_set.
fd_set
=
`
grep
'^type _fd_set '
gen-sysinfo.go
||
true
`
fds_bits_type
=
"_C_long"
if
test
"
$fd_set
"
!=
""
;
then
fds_bits_type
=
`
echo
$fd_set
| sed
-e
's/.*[]]\([^;]*\); }$/\1/'
`
fi
echo
"type fds_bits_type
$fds_bits_type
"
>>
${
OUT
}
exit
$?
exit
$?
libgo/syscalls/sysfile_posix.go
View file @
4ac7fcaa
...
@@ -181,10 +181,10 @@ func Gettimeofday(tv *Timeval) (errno int) {
...
@@ -181,10 +181,10 @@ func Gettimeofday(tv *Timeval) (errno int) {
return
;
return
;
}
}
const
nfdbits
=
unsafe
.
Sizeof
(
_C_long
)
*
8
const
nfdbits
=
unsafe
.
Sizeof
(
fds_bits_type
)
*
8
type
FdSet_t
struct
{
type
FdSet_t
struct
{
Fds_bits
[(
FD_SETSIZE
+
nfdbits
-
1
)
/
nfdbits
]
_C_long
Fds_bits
[(
FD_SETSIZE
+
nfdbits
-
1
)
/
nfdbits
]
fds_bits_type
}
}
func
FDSet
(
fd
int
,
set
*
FdSet_t
)
{
func
FDSet
(
fd
int
,
set
*
FdSet_t
)
{
...
...
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