@@ -340,7 +340,7 @@ enum {
TEXT = 0, ESCAPE = 033, BRACKET = '['
};
-static DWORD WINAPI console_thread(LPVOID unused)
+static unsigned int WINAPI console_thread(LPVOID unused)
{
unsigned char buffer[BUFFER_SIZE];
DWORD bytes;
@@ -643,9 +643,9 @@ void winansi_init(void)
die_lasterr("CreateFile for named pipe failed");
/* start console spool thread on the pipe's read end */
- hthread = CreateThread(NULL, 0, console_thread, NULL, 0, NULL);
+ hthread = (HANDLE)_beginthreadex(NULL, 0, console_thread, NULL, 0, NULL);
if (!hthread)
- die_lasterr("CreateThread(console_thread) failed");
+ die_lasterr("_beginthreadex(console_thread) failed");
/* schedule cleanup routine */
if (atexit(winansi_exit))