Commit 1f3a385e authored by mimaki's avatar mimaki

Fix build error and refine definition of `ssize_t` on MSVC.

parent 6f5c211c
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
# define MRB_END_DECL # define MRB_END_DECL
#endif #endif
#if defined _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
/** /**
* Shared compiler macros * Shared compiler macros
*/ */
......
...@@ -34,12 +34,6 @@ ...@@ -34,12 +34,6 @@
typedef long fsuseconds_t; typedef long fsuseconds_t;
typedef int fmode_t; typedef int fmode_t;
typedef int mrb_io_read_write_size; typedef int mrb_io_read_write_size;
#ifndef MRB_MINGW32_LEGACY
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && \
!defined(__have_typedef_ssize_t)
typedef SSIZE_T ssize_t;
#endif
#endif
#ifndef O_TMPFILE #ifndef O_TMPFILE
#define O_TMPFILE O_TEMPORARY #define O_TMPFILE O_TEMPORARY
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
#include <winerror.h> #include <winerror.h>
#define SHUT_RDWR SD_BOTH #define SHUT_RDWR SD_BOTH
#ifndef _SSIZE_T_DEFINED
typedef int ssize_t;
#endif
typedef int fsize_t; typedef int fsize_t;
#else #else
#include <sys/types.h> #include <sys/types.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment