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
Apr 28, 2020
by
Uchio Kondo
Committed by
Hiroshi Mimaki
May 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip socket check on windows
parent
4b81bce4
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
();
}
...
...
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