Fix build error and refine definition of `ssize_t` on MSVC.
MODIFY
include/mruby/common.h
include/mruby/common.h
# define MRB_END_DECL
#endif
+#if defined _MSC_VER
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
/**
* Shared compiler macros
*/

MODIFY
mrbgems/mruby-io/src/io.c
mrbgems/mruby-io/src/io.c
typedef long fsuseconds_t;
typedef int fmode_t;
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
#define O_TMPFILE O_TEMPORARY

MODIFY
mrbgems/mruby-socket/src/socket.c
mrbgems/mruby-socket/src/socket.c
#include <winerror.h>
#define SHUT_RDWR SD_BOTH
- #ifndef _SSIZE_T_DEFINED
- typedef int ssize_t;
- #endif
typedef int fsize_t;
#else
#include <sys/types.h>

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