diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-09-09 01:44:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-09-09 02:24:00 -0400 |
commit | ee73abf25e8431f4ea8c95629622cf23515c1d07 (patch) | |
tree | eba853878b31f0ed2ec763a5c5f97b921f1df5b2 /sim/ppc/main.c | |
parent | 03de8f26e8286f6160a9fcd6b082893ed850e8fa (diff) | |
download | gdb-ee73abf25e8431f4ea8c95629622cf23515c1d07.zip gdb-ee73abf25e8431f4ea8c95629622cf23515c1d07.tar.gz gdb-ee73abf25e8431f4ea8c95629622cf23515c1d07.tar.bz2 |
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.
Diffstat (limited to 'sim/ppc/main.c')
-rw-r--r-- | sim/ppc/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 <string.h> #include <errno.h> -#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; |