mirror of
https://github.com/RubyMetric/chsrc
synced 2025-09-09 02:58:20 +08:00
使用 xy.os_devnull
This commit is contained in:
parent
90315917e9
commit
28d913c58b
5
lib/xy.h
5
lib/xy.h
@ -64,7 +64,6 @@ bool xy_on_macos = false;
|
||||
bool xy_on_bsd = false;
|
||||
bool xy_on_android = false;
|
||||
|
||||
char *xy_os_devnull = NULL;
|
||||
|
||||
/* 全局变量 与 全局状态 */
|
||||
struct
|
||||
@ -1222,9 +1221,9 @@ xy_init ()
|
||||
xy_detect_os ();
|
||||
|
||||
if (xy_on_windows)
|
||||
xy_os_devnull = "nul";
|
||||
xy.os_devnull = "nul";
|
||||
else
|
||||
xy_os_devnull = "/dev/null";
|
||||
xy.os_devnull = "/dev/null";
|
||||
|
||||
xy_use_utf8 ();
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ measure_speed_for_url (void *url)
|
||||
ipv6 = "--ipv6";
|
||||
}
|
||||
|
||||
char *os_devnull = xy_os_devnull;
|
||||
char *os_devnull = xy.os_devnull;
|
||||
|
||||
/**
|
||||
* @note 我们用 —L,因为部分链接会跳转到其他地方,比如: RubyChina, npmmirror
|
||||
|
Loading…
x
Reference in New Issue
Block a user