mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
parent
1bd69867d1
commit
4f66d7f2dd
7 changed files with 72 additions and 2 deletions
|
@ -106,6 +106,11 @@ bool32 SetConsoleCursorInfo(
|
||||||
int64_t hConsoleOutput,
|
int64_t hConsoleOutput,
|
||||||
const struct NtConsoleCursorInfo *lpConsoleCursorInfo);
|
const struct NtConsoleCursorInfo *lpConsoleCursorInfo);
|
||||||
|
|
||||||
|
long CreatePseudoConsole(struct NtCoord size, int64_t hInput, int64_t hOutput,
|
||||||
|
uint32_t dwFlags, int64_t *out_phPC);
|
||||||
|
long ResizePseudoConsole(int64_t hPC, struct NtCoord size);
|
||||||
|
void ClosePseudoConsole(int64_t hPC);
|
||||||
|
|
||||||
#if ShouldUseMsabiAttribute()
|
#if ShouldUseMsabiAttribute()
|
||||||
#include "libc/nt/thunk/console.inc"
|
#include "libc/nt/thunk/console.inc"
|
||||||
#endif /* ShouldUseMsabiAttribute() */
|
#endif /* ShouldUseMsabiAttribute() */
|
||||||
|
|
6
libc/nt/enum/pseudoconsole.h
Normal file
6
libc/nt/enum/pseudoconsole.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_PSEUDOCONSOLE_H_
|
||||||
|
#define COSMOPOLITAN_LIBC_NT_ENUM_PSEUDOCONSOLE_H_
|
||||||
|
|
||||||
|
#define kNtPseudoconsoleInheritCursor 1
|
||||||
|
|
||||||
|
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_PSEUDOCONSOLE_H_ */
|
20
libc/nt/kernel32/ClosePseudoConsole.S
Normal file
20
libc/nt/kernel32/ClosePseudoConsole.S
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#include "libc/nt/codegen.h"
|
||||||
|
.imp kernel32,__imp_ClosePseudoConsole,ClosePseudoConsole
|
||||||
|
|
||||||
|
.text.windows
|
||||||
|
.ftrace1
|
||||||
|
ClosePseudoConsole:
|
||||||
|
.ftrace2
|
||||||
|
#ifdef __x86_64__
|
||||||
|
push %rbp
|
||||||
|
mov %rsp,%rbp
|
||||||
|
mov %rdi,%rcx
|
||||||
|
sub $32,%rsp
|
||||||
|
call *__imp_ClosePseudoConsole(%rip)
|
||||||
|
leave
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
mov x0,#0
|
||||||
|
#endif
|
||||||
|
ret
|
||||||
|
.endfn ClosePseudoConsole,globl
|
||||||
|
.previous
|
18
libc/nt/kernel32/CreatePseudoConsole.S
Normal file
18
libc/nt/kernel32/CreatePseudoConsole.S
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include "libc/nt/codegen.h"
|
||||||
|
.imp kernel32,__imp_CreatePseudoConsole,CreatePseudoConsole
|
||||||
|
|
||||||
|
.text.windows
|
||||||
|
.ftrace1
|
||||||
|
CreatePseudoConsole:
|
||||||
|
.ftrace2
|
||||||
|
#ifdef __x86_64__
|
||||||
|
push %rbp
|
||||||
|
mov %rsp,%rbp
|
||||||
|
mov __imp_CreatePseudoConsole(%rip),%rax
|
||||||
|
jmp __sysv2nt6
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
mov x0,#0
|
||||||
|
ret
|
||||||
|
#endif
|
||||||
|
.endfn CreatePseudoConsole,globl
|
||||||
|
.previous
|
18
libc/nt/kernel32/ResizePseudoConsole.S
Normal file
18
libc/nt/kernel32/ResizePseudoConsole.S
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include "libc/nt/codegen.h"
|
||||||
|
.imp kernel32,__imp_ResizePseudoConsole,ResizePseudoConsole
|
||||||
|
|
||||||
|
.text.windows
|
||||||
|
.ftrace1
|
||||||
|
ResizePseudoConsole:
|
||||||
|
.ftrace2
|
||||||
|
#ifdef __x86_64__
|
||||||
|
push %rbp
|
||||||
|
mov %rsp,%rbp
|
||||||
|
mov __imp_ResizePseudoConsole(%rip),%rax
|
||||||
|
jmp __sysv2nt
|
||||||
|
#elif defined(__aarch64__)
|
||||||
|
mov x0,#0
|
||||||
|
ret
|
||||||
|
#endif
|
||||||
|
.endfn ResizePseudoConsole,globl
|
||||||
|
.previous
|
|
@ -58,6 +58,7 @@ imp 'CancelSynchronousIo' CancelSynchronousIo kernel32 1
|
||||||
imp 'CheckRemoteDebuggerPresent' CheckRemoteDebuggerPresent kernel32 2
|
imp 'CheckRemoteDebuggerPresent' CheckRemoteDebuggerPresent kernel32 2
|
||||||
imp 'ClearCommBreak' ClearCommBreak kernel32 1
|
imp 'ClearCommBreak' ClearCommBreak kernel32 1
|
||||||
imp 'CloseHandle' CloseHandle kernel32 1
|
imp 'CloseHandle' CloseHandle kernel32 1
|
||||||
|
imp 'ClosePseudoConsole' ClosePseudoConsole kernel32 1 # Windows 10+
|
||||||
imp 'ConnectNamedPipe' ConnectNamedPipe kernel32 2
|
imp 'ConnectNamedPipe' ConnectNamedPipe kernel32 2
|
||||||
imp 'ContinueDebugEvent' ContinueDebugEvent kernel32 3
|
imp 'ContinueDebugEvent' ContinueDebugEvent kernel32 3
|
||||||
imp 'CopyFile' CopyFileW kernel32 3
|
imp 'CopyFile' CopyFileW kernel32 3
|
||||||
|
@ -65,6 +66,7 @@ imp 'CreateEvent' CreateEventW kernel32 4
|
||||||
imp 'CreateEventEx' CreateEventExW kernel32 4
|
imp 'CreateEventEx' CreateEventExW kernel32 4
|
||||||
imp 'CreateHardLink' CreateHardLinkW kernel32 3
|
imp 'CreateHardLink' CreateHardLinkW kernel32 3
|
||||||
imp 'CreateIoCompletionPort' CreateIoCompletionPort kernel32 4
|
imp 'CreateIoCompletionPort' CreateIoCompletionPort kernel32 4
|
||||||
|
imp 'CreatePseudoConsole' CreatePseudoConsole kernel32 5 # Windows 10+
|
||||||
imp 'CreateSemaphore' CreateSemaphoreW kernel32 4
|
imp 'CreateSemaphore' CreateSemaphoreW kernel32 4
|
||||||
imp 'CreateToolhelp32Snapshot' CreateToolhelp32Snapshot kernel32 2
|
imp 'CreateToolhelp32Snapshot' CreateToolhelp32Snapshot kernel32 2
|
||||||
imp 'CreateWaitableTimer' CreateWaitableTimerW kernel32 3
|
imp 'CreateWaitableTimer' CreateWaitableTimerW kernel32 3
|
||||||
|
@ -227,6 +229,7 @@ imp 'ReleaseSemaphore' ReleaseSemaphore kernel32 3
|
||||||
imp 'RemoveVectoredContinueHandler' RemoveVectoredContinueHandler kernel32 1
|
imp 'RemoveVectoredContinueHandler' RemoveVectoredContinueHandler kernel32 1
|
||||||
imp 'RemoveVectoredExceptionHandler' RemoveVectoredExceptionHandler kernel32 1
|
imp 'RemoveVectoredExceptionHandler' RemoveVectoredExceptionHandler kernel32 1
|
||||||
imp 'ResetEvent' ResetEvent kernel32 1
|
imp 'ResetEvent' ResetEvent kernel32 1
|
||||||
|
imp 'ResizePseudoConsole' ResizePseudoConsole kernel32 2 # Windows 10+
|
||||||
imp 'ResumeThread' ResumeThread kernel32 1
|
imp 'ResumeThread' ResumeThread kernel32 1
|
||||||
imp 'SetConsoleActiveScreenBuffer' SetConsoleActiveScreenBuffer kernel32 1 # TODO(jart): 6.2 and higher
|
imp 'SetConsoleActiveScreenBuffer' SetConsoleActiveScreenBuffer kernel32 1 # TODO(jart): 6.2 and higher
|
||||||
imp 'SetConsoleCP' SetConsoleCP kernel32 1 # TODO(jart): 6.2 and higher
|
imp 'SetConsoleCP' SetConsoleCP kernel32 1 # TODO(jart): 6.2 and higher
|
||||||
|
|
4
third_party/make/config.h
vendored
4
third_party/make/config.h
vendored
|
@ -507,10 +507,10 @@
|
||||||
#define HAVE_WORKING_VFORK 1
|
#define HAVE_WORKING_VFORK 1
|
||||||
|
|
||||||
/* Default C++ compiler. */
|
/* Default C++ compiler. */
|
||||||
#define MAKE_CXX "/opt/cosmocc/bin/aarch64-unknown-cosmo-c++"
|
#define MAKE_CXX "c++"
|
||||||
|
|
||||||
/* Build host information. */
|
/* Build host information. */
|
||||||
#define MAKE_HOST "x86_64-pc-linux-musl"
|
#define MAKE_HOST "x86_64-linux-cosmo"
|
||||||
|
|
||||||
/* Define to 1 to enable job server support in GNU Make. */
|
/* Define to 1 to enable job server support in GNU Make. */
|
||||||
#define MAKE_JOBSERVER 1
|
#define MAKE_JOBSERVER 1
|
||||||
|
|
Loading…
Reference in a new issue