diff options
| author | ruki <[email protected]> | 2022-07-28 00:38:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-28 00:38:04 +0800 |
| commit | 052592ef62dc4d868a8ad27b7aa6b93605e77586 (patch) | |
| tree | 4ad5d5a538c2c128651b156f237b76956987d6dc | |
| parent | 7e53425e7c9c804a7a2009dbf41cff56f6024964 (diff) | |
remove env
| -rw-r--r-- | .github/workflows/freebsd.yml | 2 | ||||
| -rw-r--r-- | core/src/xmake/io/stdfile.c | 21 |
2 files changed, 9 insertions, 14 deletions
diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index e9c55944d..9a81d1a6c 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -27,7 +27,7 @@ jobs: copyback: false prepare: pkg install -y curl unzip gmake llvm gsed bash perl5 run: | - gmake -j4 + gmake gmake install export XMAKE_ROOT=y xrepo --version diff --git a/core/src/xmake/io/stdfile.c b/core/src/xmake/io/stdfile.c index 4b830ccac..25364d9c7 100644 --- a/core/src/xmake/io/stdfile.c +++ b/core/src/xmake/io/stdfile.c @@ -81,21 +81,16 @@ static tb_size_t xm_io_stdfile_isatty(tb_size_t type) return type; } +// @see https://github.com/xmake-io/xmake/issues/2580 static tb_void_t xm_io_stdfile_init_buffer(tb_size_t type) { -#if defined(TB_CONFIG_OS_WINDOWS) - // TODO -#else - tb_char_t data[256]; - if (tb_environment_first("XMAKE_STDOUT_LINEFLUSH", data, sizeof(data))) - { - struct stat stats; - tb_int_t size = BUFSIZ; - int fileno(FILE*); - if (fstat(fileno(stdout), &stats) != -1) - size = stats.st_blksize; - setvbuf(stdout, tb_null, _IOLBF, size); - } +#if !defined(TB_CONFIG_OS_WINDOWS) + struct stat stats; + tb_int_t size = BUFSIZ; + int fileno(FILE*); + if (fstat(fileno(stdout), &stats) != -1) + size = stats.st_blksize; + setvbuf(stdout, tb_null, _IOLBF, size); #endif } |
