diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-03-15 13:13:54 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-03-15 13:13:54 -0400 |
commit | 5ea7f4ea1f5015290b90bc51e503298aeef6cfb5 (patch) | |
tree | a4cefa12bfa027539f02919785f54a3312e25273 /parse.c | |
parent | 10975c723ed0c5a6764fda3d4f539a36033dcb0d (diff) | |
download | bfs-5ea7f4ea1f5015290b90bc51e503298aeef6cfb5.tar.xz |
parse: Don't warn if POSIXLY_CORRECT is set
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3533,11 +3533,13 @@ struct cmdline *parse_cmdline(int argc, char *argv[]) { } bool stdin_tty = isatty(STDIN_FILENO); - cmdline->warn = stdin_tty; - bool stdout_tty = isatty(STDOUT_FILENO); bool stderr_tty = isatty(STDERR_FILENO); + if (!getenv("POSIXLY_CORRECT")) { + cmdline->warn = stdin_tty; + } + struct parser_state state = { .cmdline = cmdline, .argv = cmdline->argv + 1, |