This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CPP warnings under DJGPP
- To: Laurynas Biveinis <lauras at softhome dot net>
- Subject: Re: CPP warnings under DJGPP
- From: Per Bothner <per at bothner dot com>
- Date: 30 May 2000 12:05:19 -0700
- Cc: GNU Compiler <gcc at gcc dot gnu dot org>
- References: <3933FCBD.D9B0197E@softhome.net>
Laurynas Biveinis <lauras@softhome.net> writes:
> return open (filename, O_RDONLY|O_NOCTTY
> #ifdef DJGPP
> |O_BINARY
> #endif
> ), 0666);
>
> However, if other DOS-based platforms have different ways to
> do this or GCC maintainers want a cleanier fix, another
> solution is required?
I've used
#ifndef O_BINARY
#define O_BINARY 0
#endif
as a relatively clean solution to this DOS brain-damage.
(By brain-damage I don't mean using crlf, though in retrospect that
was a mistake. Nor do I complain that files do crlf-conversion
by default. The big mistate, which we now have to live with, was
having posix (open'd) files do crlf-conversion by default, since
it forces extra buffering.)
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/