mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 12:27:40 +00:00
R_SYS_DEVNULL: null device name (#10233)
This commit is contained in:
parent
e6ff3aa11b
commit
7befed4463
@ -699,11 +699,7 @@ int main(int argc, char **argv, char **envp) {
|
||||
eprintf ("Failed to close stderr");
|
||||
return 1;
|
||||
}
|
||||
#if __WINDOWS__ && !__CYGWIN__
|
||||
const char nul[] = "nul";
|
||||
#else
|
||||
const char nul[] = "/dev/null";
|
||||
#endif
|
||||
const char nul[] = R_SYS_DEVNULL;
|
||||
int new_stderr = open (nul, O_RDWR);
|
||||
if (-1 == new_stderr) {
|
||||
eprintf ("Failed to open %s", nul);
|
||||
|
@ -19,11 +19,7 @@ static bool checkExtract() {
|
||||
}
|
||||
|
||||
static bool checkCurl() {
|
||||
#if __WINDOWS__ && !__CYGWIN__
|
||||
const char nul[] = "nul";
|
||||
#else
|
||||
const char nul[] = "/dev/null";
|
||||
#endif
|
||||
const char nul[] = R_SYS_DEVNULL;
|
||||
if (r_sys_cmdf ("curl --version > %s", nul) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -3,6 +3,12 @@
|
||||
|
||||
#include <r_list.h>
|
||||
|
||||
#if __WINDOWS__ && !__CYGWIN__
|
||||
#define R_SYS_DEVNULL "nul"
|
||||
#else
|
||||
#define R_SYS_DEVNULL "/dev/null"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user