delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/25/13:03:51

X-Spam-Check-By: sourceware.org
Message-ID: <BAY112-DAV1ED129EF3FDEDAA51B28AC5A30@phx.gbl>
X-Sender: arundelo AT hotmail DOT com
From: "Aaron Brown" <arundelo AT hotmail DOT com>
To: "Cygwin list" <cygwin AT cygwin DOT com>
References: <BAY112-DAV120EB321505D27E8138E91C5B80 AT phx DOT gbl> <001b01c73033$ee617c20$0708090a AT CAM DOT ARTIMI DOT COM> <6910a60701090934iff9bd94h3157e3b7d09bb31b AT mail DOT gmail DOT com> <6910a60701111339g28b22ae7y30077e33709c739e AT mail DOT gmail DOT com>
Subject: Re: Compile-time detection of EOL translation mode (CLISP)
Date: Thu, 25 Jan 2007 13:03:21 -0500
MIME-Version: 1.0
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Reini Urban wrote:

> Confirmed.
> Bug patched at http://sourceforge.net/tracker/index.php?func=detail&aid=1633552&group_id=1355&atid=101355

It's been moved to <http://tinyurl.com/3b3yux> with the
following comment from Sam Steingold:

> This patch does not seem right.
> on linux O_BINARY==0 and I see no reason to default line
> termination to :DOS there.
> I am rejecting it pending your convincing me that I am
> wrong here.

To be honest, it didn't seem quite right to me either, but I
figured that was down to me not knowing the ins and outs of
how Cygwin handles text modes.

The original logic was:

> #if defined(WIN32) || (defined(UNIX) && (O_BINARY != 0))
>  pushSTACK(S(Kdos));           /* :line-terminator */
> #else
>  pushSTACK(S(Kunix));          /* :line-terminator */

which translates to "if O_BINARY is something other than 0,
then this unix must differentiate between text and binary
streams, so assume that text streams use dos EOLs".  That
makes sense, except that O_BINARY is nonzero even on (for
instance) my Cygwin installation, where I selected unix EOLs
as the default with setup.exe.

The patch changes the condition to:

> #if defined(WIN32) || (defined(UNIX) && (O_BINARY == 0))

which, as Sam pointed out, would make most unixes (on which
O_BINARY is 0) use dos EOLs.

Thanks,

-- 
Aaron
Beginning Lua Programming: http://www.amazon.com/gp/product/0470069171/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019