Enable compiling Pipe and LibuvUtils on Windows

Currently only works when building with debug target. On GitHub actions
target release results in linking errors. So disable PTY for release
builds.

Part of #25.
This commit is contained in:
Leroy Hopson 2021-07-16 14:31:13 +07:00
parent 88e5320a83
commit 84243cd824
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
8 changed files with 145 additions and 101 deletions

View file

@ -13,6 +13,10 @@
#include <vector>
#include <xkbcommon/xkbcommon-keysyms.h>
#ifndef ULONG
#define ULONG size_t
#endif
using namespace godot;
void Pipe::_register_methods() {
@ -54,9 +58,11 @@ godot_error Pipe::open(int fd, bool ipc = false) {
godot_error Pipe::write(String p_data) {
char *s = p_data.alloc_c_string();
size_t len = strlen(s);
ULONG len = strlen(s);
uv_buf_t bufs[] = {{.base = s, .len = len}};
uv_buf_t bufs[1];
bufs[0].base = s;
bufs[0].len = len;
uv_write_t req;