RFA: Ignore DOS end-of-line characters (ctrl-Z) unless -W

Eli Zaretskii eliz@is.elta.co.il
Wed May 8 12:27:00 GMT 2002


> Date: Wed, 8 May 2002 09:23:38 -0700
> From: Zack Weinberg <zack@codesourcery.com>
> 
>   if (filename[0] == '\0')
>     {
>       file->fd = 0;
> #ifdef __DJGPP__
>       setmode(file->fd, O_BINARY)
> #endif
>     }
>   else
>     ...

I suggest to use this instead:

   if (filename[0] == '\0')
     {
       file->fd = 0;
 #ifdef __DJGPP__
       if (!isatty(file->fd))
         setmode(file->fd, O_BINARY)
 #endif
     }
   else
     ...

(See my other mail for the reasons.)



More information about the Gcc-patches mailing list