From ee73abf25e8431f4ea8c95629622cf23515c1d07 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 9 Sep 2021 01:44:24 -0400 Subject: sim: drop old O_NDELAY & FNBLOCK support We use these older names inconsistently in the sim codebase, and time has moved on long ago, so drop support for these non-standard names. POSIX provides O_NONBLOCK for us, so use it everywhere. --- sim/ppc/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sim/ppc/main.c') diff --git a/sim/ppc/main.c b/sim/ppc/main.c index 2d4d7e4..3b82c88 100644 --- a/sim/ppc/main.c +++ b/sim/ppc/main.c @@ -40,7 +40,7 @@ #include #include -#if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL) +#if !defined(O_NONBLOCK) || !defined(F_GETFL) || !defined(F_SETFL) #undef WITH_STDIO #define WITH_STDIO DO_USE_STDIO #endif @@ -150,7 +150,7 @@ sim_io_read_stdin(char *buf, return sim_io_eof; break; case DONT_USE_STDIO: -#if defined(O_NDELAY) && defined(F_GETFL) && defined(F_SETFL) +#if defined(O_NONBLOCK) && defined(F_GETFL) && defined(F_SETFL) { /* check for input */ int flags; @@ -164,7 +164,7 @@ sim_io_read_stdin(char *buf, return sim_io_eof; } /* temp, disable blocking IO */ - status = fcntl(0, F_SETFL, flags | O_NDELAY); + status = fcntl(0, F_SETFL, flags | O_NONBLOCK); if (status == -1) { perror("sim_io_read_stdin"); return sim_io_eof; -- cgit v1.1