Commit 77d004e8 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3213 from unak/print-visualc

Visual C++ support of UTF-8 hack on mruby-print
parents cb29c9b4 36c08476
......@@ -3,16 +3,20 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined(__MINGW32__) || defined(__MINGW64__)
#if defined(_WIN32)
# include <windows.h>
# include <io.h>
#ifdef _MSC_VER
# define isatty(x) _isatty(x)
# define fileno(x) _fileno(x)
#endif
#endif
static void
printstr(mrb_state *mrb, mrb_value obj)
{
if (mrb_string_p(obj)) {
#if defined(__MINGW32__) || defined(__MINGW64__)
#if defined(_WIN32)
if (isatty(fileno(stdout))) {
DWORD written;
int mlen = RSTRING_LEN(obj);
......
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