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
8020374d
Commit
8020374d
authored
Feb 01, 2020
by
dearblue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix builds for old mingw in mruby-socket; ref #4914
parent
db64bd42
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
include/mruby/common.h
include/mruby/common.h
+10
-0
mrbgems/mruby-io/test/mruby_io_test.c
mrbgems/mruby-io/test/mruby_io_test.c
+1
-6
mrbgems/mruby-socket/test/sockettest.c
mrbgems/mruby-socket/test/sockettest.c
+3
-1
No files found.
include/mruby/common.h
View file @
8020374d
...
@@ -74,6 +74,16 @@ MRB_BEGIN_DECL
...
@@ -74,6 +74,16 @@ MRB_BEGIN_DECL
#endif
#endif
#endif
#endif
/** Declare mingw versions */
#if defined(__MINGW32__) || defined(__MINGW64__)
# include <_mingw.h>
# if defined(__MINGW64_VERSION_MAJOR)
# define MRB_MINGW64_VERSION (__MINGW64_VERSION_MAJOR * 1000 + __MINGW64_VERSION_MINOR)
# elif defined(__MINGW32_MAJOR_VERSION)
# define MRB_MINGW32_VERSION (__MINGW32_MAJOR_VERSION * 1000 + __MINGW32_MINOR_VERSION)
# endif
#endif
MRB_END_DECL
MRB_END_DECL
#endif
/* MRUBY_COMMON_H */
#endif
/* MRUBY_COMMON_H */
mrbgems/mruby-io/test/mruby_io_test.c
View file @
8020374d
#include <mruby/common.h>
#include <sys/types.h>
#include <sys/types.h>
#include <errno.h>
#include <errno.h>
...
@@ -18,12 +19,6 @@ typedef int mode_t;
...
@@ -18,12 +19,6 @@ typedef int mode_t;
#define open _open
#define open _open
#define close _close
#define close _close
#if defined(__MINGW64_VERSION_MAJOR)
# define MRB_MINGW64_VERSION (__MINGW64_VERSION_MAJOR * 1000 + __MINGW64_VERSION_MINOR)
#elif defined(__MINGW32_MAJOR_VERSION)
# define MRB_MINGW32_VERSION (__MINGW32_MAJOR_VERSION * 1000 + __MINGW32_MINOR_VERSION)
#endif
#if defined(_MSC_VER) || \
#if defined(_MSC_VER) || \
(defined(MRB_MINGW32_VERSION) && MRB_MINGW32_VERSION < 3021) || \
(defined(MRB_MINGW32_VERSION) && MRB_MINGW32_VERSION < 3021) || \
(defined(MRB_MINGW64_VERSION) && MRB_MINGW64_VERSION < 4000)
(defined(MRB_MINGW64_VERSION) && MRB_MINGW64_VERSION < 4000)
...
...
mrbgems/mruby-socket/test/sockettest.c
View file @
8020374d
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
#include <io.h>
#include <io.h>
#ifdef _MSC_VER
#if defined(_MSC_VER) || \
(defined(MRB_MINGW32_VERSION) && MRB_MINGW32_VERSION < 3021) || \
(defined(MRB_MINGW64_VERSION) && MRB_MINGW64_VERSION < 4000)
#include <fcntl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/stat.h>
...
...
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