Improve system call support

This commit is contained in:
Justine Tunney 2021-08-25 21:35:58 -07:00
parent 63b867bd2f
commit 3085ac7837
65 changed files with 900 additions and 544 deletions

View file

@ -17,9 +17,11 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/bits/safemacros.internal.h"
#include "libc/calls/calls.h"
#include "libc/dce.h"
#include "libc/log/color.internal.h"
#include "libc/log/log.h"
#include "libc/nt/enum/version.h"
#include "libc/runtime/runtime.h"
#include "libc/str/str.h"
@ -47,7 +49,9 @@ bool cancolor(void) {
static bool once;
static bool result;
if (!once) {
result = !!strcmp(nulltoempty(getenv("DONTANSIMEBRO")), "1") &&
result = (!IsWindows() || NtGetVersion() >= kNtVersionWindows10 ||
!ischardev(1)) &&
!!strcmp(nulltoempty(getenv("DONTANSIMEBRO")), "1") &&
!!strcmp(nulltoempty(getenv("TERM")), "dumb");
once = true;
}