Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gcc-cobol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COBOLworx
gcc-cobol
Commits
3c450181
Commit
3c450181
authored
11 years ago
by
Ian Lance Taylor
Browse files
Options
Downloads
Patches
Plain Diff
mksysinfo, net: Always define F_DUPFD_CLOEXEC.
For Solaris and CentOS portability. From-SVN: r204687
parent
35aacd4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libgo/go/net/fd_unix.go
+1
-1
1 addition, 1 deletion
libgo/go/net/fd_unix.go
libgo/mksysinfo.sh
+5
-0
5 additions, 0 deletions
libgo/mksysinfo.sh
with
6 additions
and
1 deletion
libgo/go/net/fd_unix.go
+
1
−
1
View file @
3c450181
...
@@ -410,7 +410,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e
...
@@ -410,7 +410,7 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e
var
tryDupCloexec
=
int32
(
1
)
var
tryDupCloexec
=
int32
(
1
)
func
dupCloseOnExec
(
fd
int
)
(
newfd
int
,
err
error
)
{
func
dupCloseOnExec
(
fd
int
)
(
newfd
int
,
err
error
)
{
if
atomic
.
LoadInt32
(
&
tryDupCloexec
)
==
1
{
if
atomic
.
LoadInt32
(
&
tryDupCloexec
)
==
1
&&
syscall
.
F_DUPFD_CLOEXEC
!=
0
{
r0
,
_
,
e1
:=
syscall
.
Syscall
(
syscall
.
SYS_FCNTL
,
uintptr
(
fd
),
syscall
.
F_DUPFD_CLOEXEC
,
0
)
r0
,
_
,
e1
:=
syscall
.
Syscall
(
syscall
.
SYS_FCNTL
,
uintptr
(
fd
),
syscall
.
F_DUPFD_CLOEXEC
,
0
)
if
runtime
.
GOOS
==
"darwin"
&&
e1
==
syscall
.
EBADF
{
if
runtime
.
GOOS
==
"darwin"
&&
e1
==
syscall
.
EBADF
{
// On OS X 10.6 and below (but we only support
// On OS X 10.6 and below (but we only support
...
...
This diff is collapsed.
Click to expand it.
libgo/mksysinfo.sh
+
5
−
0
View file @
3c450181
...
@@ -220,6 +220,11 @@ if ! grep '^const O_CLOEXEC' ${OUT} >/dev/null 2>&1; then
...
@@ -220,6 +220,11 @@ if ! grep '^const O_CLOEXEC' ${OUT} >/dev/null 2>&1; then
echo
"const O_CLOEXEC = 0"
>>
${
OUT
}
echo
"const O_CLOEXEC = 0"
>>
${
OUT
}
fi
fi
# The os package requires F_DUPFD_CLOEXEC to be defined.
if
!
grep
'^const F_DUPFD_CLOEXEC'
${
OUT
}
>
/dev/null 2>&1
;
then
echo
"const F_DUPFD_CLOEXEC = 0"
>>
${
OUT
}
fi
# These flags can be lost on i386 GNU/Linux when using
# These flags can be lost on i386 GNU/Linux when using
# -D_FILE_OFFSET_BITS=64, because we see "#define F_SETLK F_SETLK64"
# -D_FILE_OFFSET_BITS=64, because we see "#define F_SETLK F_SETLK64"
# before we see the definition of F_SETLK64.
# before we see the definition of F_SETLK64.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment