From: Richard M. Stallman Date: Fri, 12 Apr 1996 16:02:38 +0000 (+0000) Subject: [DJGPP v2]: Include io.h. X-Git-Tag: emacs-19.34~852 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=659d3b439c911daaf4af01c63ba09863b800c8ca;p=emacs.git [DJGPP v2]: Include io.h. (main) [DJGPP v2]: Switch standard streams to binary with setmode. --- diff --git a/lib-src/hexl.c b/lib-src/hexl.c index b090dae335b..417d9f285d1 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -2,6 +2,9 @@ #include #ifdef MSDOS #include +#if __DJGPP__ >= 2 +#include +#endif #endif #define DEFAULT_GROUPING 0x01 @@ -134,8 +137,12 @@ main (argc, argv) char buf[18]; #ifdef MSDOS +#if __DJGPP__ >= 2 + setmode (fileno (stdout), O_BINARY); +#else (stdout)->_flag &= ~_IOTEXT; /* print binary */ _setmode (fileno (stdout), O_BINARY); +#endif #endif for (;;) { @@ -178,8 +185,12 @@ main (argc, argv) else { #ifdef MSDOS +#if __DJGPP__ >= 2 + setmode (fileno (stdout), O_BINARY); +#else (fp)->_flag &= ~_IOTEXT; /* read binary */ _setmode (fileno (fp), O_BINARY); +#endif #endif address = 0; string[0] = ' ';