mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-27 09:37:24 +08:00
b8bd9d1b01
Move all the source files used in utils/mingw/ into that subdirectory, so the built objects are in the expected place. (path.cc requires some more unpicking, and even then there is genuinely some shared code, so use a trivial file which includes the real path.cc so the object file is generated where expected)
27 lines
701 B
C++
27 lines
701 B
C++
#include <windows.h>
|
|
#include <stdio.h>
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
char *end;
|
|
if (argc < 3)
|
|
exit (1);
|
|
HANDLE h = (HANDLE) strtoull (argv[1], &end, 0);
|
|
SetEvent (h);
|
|
if (argc == 4) /* Pseudo console helper mode for PTY */
|
|
{
|
|
SetConsoleCtrlHandler (NULL, TRUE);
|
|
HANDLE hPipe = (HANDLE) strtoull (argv[3], &end, 0);
|
|
char buf[64];
|
|
sprintf (buf, "StdHandles=%p,%p\n",
|
|
GetStdHandle (STD_INPUT_HANDLE),
|
|
GetStdHandle (STD_OUTPUT_HANDLE));
|
|
DWORD dwLen;
|
|
WriteFile (hPipe, buf, strlen (buf), &dwLen, NULL);
|
|
CloseHandle (hPipe);
|
|
}
|
|
h = (HANDLE) strtoull (argv[2], &end, 0);
|
|
WaitForSingleObject (h, INFINITE);
|
|
exit (0);
|
|
}
|