This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libcpp] [PATCH] Handle DOS EOF character for DJGPP
> From: Andris Pavenis <pavenis@latnet.lv>
> Date: Mon, 18 Apr 2005 20:15:17 +0300
>
> On Monday 18 April 2005 19:17, you wrote:
> > Andris Pavenis <pavenis@latnet.lv> writes:
> > > Here is patch for HEAD branch of GCC for handling DOS EOF character
> > > (0x1A, ^Z) in libcpp.
> > >
> > > At least I have met situations when DOS EOF character is written at
> > >end of file by some editors which causes compiler to generate error.
> >
> > This was discussed and rejected some time ago. ^Z can legitimately
> > appear in the middle of a file.
>
> The patch adds handling ^Z for DJGPP only.
Right. And a DOS/Windows text file cannot have a ^Z character in its
middle, since every program that works with text files, like editors
etc., will stop reading at that character.
> > The "meat" of this patch does not appear to depend on io.h. Why did
> > you add it?
>
> As I remeber, I had compiler errors while bootstrapping GCC for DJGPP earlier,
> but perhaps I must recheck it.
The prototype of setmode is in io.h, so I'm guessing that's the reason
DJGPP needs it.