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
c915f63f
Commit
c915f63f
authored
Dec 13, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mksysinfo.sh: Ensure that IPV6 constants and types are defined.
From-SVN: r182314
parent
de05aad6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
libgo/mksysinfo.sh
+17
-7
No files found.
libgo/mksysinfo.sh
View file @
c915f63f
...
...
@@ -183,10 +183,12 @@ grep '^const _SOMAXCONN' gen-sysinfo.go |
grep
'^const _SHUT_'
gen-sysinfo.go |
sed
-e
's/^\(const \)_\(SHUT[^= ]*\)\(.*\)$/\1\2 = _\2/'
>>
${
OUT
}
# The net package requires a definition for IPV6ONLY.
if
!
grep
'^const IPV6_V6ONLY '
${
OUT
}
>
/dev/null 2>&1
;
then
echo
"const IPV6_V6ONLY = 0"
>>
${
OUT
}
fi
# The net package requires some const definitions.
for
m
in
IPV6_V6ONLY IPPROTO_IPV6 IPV6_JOIN_GROUP IPV6_LEAVE_GROUP
;
do
if
!
grep
"^const
$m
"
${
OUT
}
>
/dev/null 2>&1
;
then
echo
"const
$m
= 0"
>>
${
OUT
}
fi
done
# pathconf constants.
grep
'^const __PC'
gen-sysinfo.go |
...
...
@@ -474,11 +476,14 @@ grep '^type _ip_mreq ' gen-sysinfo.go | \
-e
's/_in_addr/[4]byte/g'
\
>>
${
OUT
}
#
The size of the ip_mreq struct
.
if
grep
'type IPMreq '
${
OUT
}
>
/dev/null 2>&1
;
then
echo
'
var SizeofIPMreq = int(unsafe.Sizeof(IPMreq{}))
'
>>
${
OUT
}
#
We need IPMreq to compile the net package
.
if
!
grep
'type IPMreq '
${
OUT
}
>
/dev/null 2>&1
;
then
echo
'
type IPMreq struct { Multiaddr [4]byte; Interface [4]byte; }
'
>>
${
OUT
}
fi
# The size of the ip_mreq struct.
echo
'var SizeofIPMreq = int(unsafe.Sizeof(IPMreq{}))'
>>
${
OUT
}
# The ipv6_mreq struct.
grep
'^type _ipv6_mreq '
gen-sysinfo.go |
\
sed
-e
's/_ipv6_mreq/IPv6Mreq/'
\
...
...
@@ -487,6 +492,11 @@ grep '^type _ipv6_mreq ' gen-sysinfo.go | \
-e
's/_in6_addr/[16]byte/'
\
>>
${
OUT
}
# We need IPv6Mreq to compile the net package.
if
!
grep
'type IPv6Mreq '
${
OUT
}
>
/dev/null 2>&1
;
then
echo
'type IPv6Mreq struct { Multiaddr [16]byte; Interface uint32; }'
>>
${
OUT
}
fi
# 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"
...
...
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