Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
508ac203
Commit
508ac203
authored
4 years ago
by
Uchio Kondo
Committed by
Hiroshi Mimaki
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip socket check on windows
parent
4b81bce4
master
removing-y-tab-c
revert-5391-throw
stable
3.1.0-rc
3.0.0
3.0.0-rc
3.0.0-preview
2.1.2
2.1.2-rc2
2.1.2-rc
2.1.1
2.1.1-rc2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mrbgems/mruby-io/test/mruby_io_test.c
mrbgems/mruby-io/test/mruby_io_test.c
+5
-1
No files found.
mrbgems/mruby-io/test/mruby_io_test.c
View file @
508ac203
...
...
@@ -70,6 +70,7 @@ mkdtemp(char *temp)
int
wd_save
;
int
socket_available_p
;
#if !defined(_WIN32) && !defined(_WIN64)
static
int
mrb_io_socket_abailable
()
{
int
fd
,
retval
=
1
;
...
...
@@ -95,6 +96,7 @@ sock_test_out:
close
(
fd
);
return
retval
;
}
#endif
static
mrb_value
mrb_io_test_io_setup
(
mrb_state
*
mrb
,
mrb_value
self
)
...
...
@@ -111,7 +113,6 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
#if !defined(_WIN32) && !defined(_WIN64)
int
fd2
,
fd3
;
struct
sockaddr_un
sun0
;
#endif
if
(
!
(
socket_available_p
=
mrb_io_socket_abailable
()))
{
char
*
tmpdir
;
...
...
@@ -122,6 +123,7 @@ mrb_io_test_io_setup(mrb_state *mrb, mrb_value self)
else
assert
(
!
chdir
(
"/tmp"
));
}
#endif
mask
=
umask
(
077
);
fd0
=
mkstemp
(
rfname
);
...
...
@@ -217,10 +219,12 @@ mrb_io_test_io_cleanup(mrb_state *mrb, mrb_value self)
mrb_gv_set
(
mrb
,
mrb_intern_cstr
(
mrb
,
"$mrbtest_io_socketname"
),
mrb_nil_value
());
mrb_gv_set
(
mrb
,
mrb_intern_cstr
(
mrb
,
"$mrbtest_io_msg"
),
mrb_nil_value
());
#if !defined(_WIN32) && !defined(_WIN64)
if
(
!
socket_available_p
)
{
assert
(
!
fchdir
(
wd_save
));
close
(
wd_save
);
}
#endif
return
mrb_nil_value
();
}
...
...
This diff is collapsed.
Click to expand it.
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