This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CPP warnings under DJGPP


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]