diff options
Diffstat (limited to 'lib-src/hexl.c')
-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 417d9f285d1..b3def05049d 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -138,7 +138,8 @@ main (argc, argv) #ifdef MSDOS #if __DJGPP__ >= 2 - setmode (fileno (stdout), O_BINARY); + if (!isatty (fileno (stdout))) + setmode (fileno (stdout), O_BINARY); #else (stdout)->_flag &= ~_IOTEXT; /* print binary */ _setmode (fileno (stdout), O_BINARY); |