使用 xy.os_devnull

This commit is contained in:
Aoran Zeng 2025-08-27 11:54:53 +08:00
parent 90315917e9
commit 28d913c58b
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,6 @@ bool xy_on_macos = false;
bool xy_on_bsd = false; bool xy_on_bsd = false;
bool xy_on_android = false; bool xy_on_android = false;
char *xy_os_devnull = NULL;
/* 全局变量 与 全局状态 */ /* 全局变量 与 全局状态 */
struct struct
@ -1222,9 +1221,9 @@ xy_init ()
xy_detect_os (); xy_detect_os ();
if (xy_on_windows) if (xy_on_windows)
xy_os_devnull = "nul"; xy.os_devnull = "nul";
else else
xy_os_devnull = "/dev/null"; xy.os_devnull = "/dev/null";
xy_use_utf8 (); xy_use_utf8 ();
} }

View File

@ -640,7 +640,7 @@ measure_speed_for_url (void *url)
ipv6 = "--ipv6"; ipv6 = "--ipv6";
} }
char *os_devnull = xy_os_devnull; char *os_devnull = xy.os_devnull;
/** /**
* @note L: RubyChina, npmmirror * @note L: RubyChina, npmmirror