Build in STDIN_CMD on Win32.

This commit is contained in:
Themaister 2012-08-07 21:31:43 +02:00
parent 54353961e1
commit 01f9ad8d8d
2 changed files with 9 additions and 4 deletions

View File

@ -35,6 +35,7 @@ HAVE_SDL = 1
HAVE_OPENGL = 1
HAVE_DYLIB = 1
HAVE_NETPLAY = 1
HAVE_STDIN_CMD = 1
HAVE_THREADS = 1
DYNAMIC = 1
@ -114,9 +115,14 @@ ifeq ($(HAVE_DYLIB), 1)
DEFINES += -DHAVE_DYLIB
endif
ifeq ($(HAVE_STDIN_CMD), 1)
DEFINES += -DHAVE_COMMAND -DHAVE_STDIN_CMD
OBJ += command.o
endif
ifeq ($(HAVE_NETPLAY), 1)
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD -DHAVE_COMMAND
OBJ += netplay.o command.o
DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD
OBJ += netplay.o
LIBS += -lws2_32
endif

View File

@ -267,8 +267,7 @@ static size_t read_stdin(char *buf, size_t size)
avail = size;
DWORD has_read = 0;
ret = ReadFile(hnd, buf, avail, &has_read, NULL);
if (!ret)
if (!ReadFile(hnd, buf, avail, &has_read, NULL))
return 0;
return has_read;