summaryrefslogtreecommitdiff
path: root/core/src/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-28 00:38:04 +0800
committerruki <[email protected]>2022-07-28 00:38:04 +0800
commit052592ef62dc4d868a8ad27b7aa6b93605e77586 (patch)
tree4ad5d5a538c2c128651b156f237b76956987d6dc /core/src/xmake
parent7e53425e7c9c804a7a2009dbf41cff56f6024964 (diff)
remove env
Diffstat (limited to 'core/src/xmake')
-rw-r--r--core/src/xmake/io/stdfile.c21
1 files changed, 8 insertions, 13 deletions
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
}