diff options
-rw-r--r-- | lib-src/hexl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib-src/hexl.c b/lib-src/hexl.c index b3def05049d..beb170613dd 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -187,7 +187,8 @@ main (argc, argv) { #ifdef MSDOS #if __DJGPP__ >= 2 - setmode (fileno (stdout), O_BINARY); + if (!isatty (fileno (fp))) + setmode (fileno (fp), O_BINARY); #else (fp)->_flag &= ~_IOTEXT; /* read binary */ _setmode (fileno (fp), O_BINARY); |