X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <20080409145136 DOT b3kibhnxhcwscws0 AT webmail DOT seas DOT upenn DOT edu> Subject: RE: Using windows text mode without setup.exe Date: Wed, 9 Apr 2008 20:43:00 +0100 Message-ID: <001b01c89a79$ead691b0$2708a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com David Dyck wrote on 09 April 2008 20:37: > On Wed, 9 Apr 2008 at 11:51 -0700, mjumbe@... wrote: > >> .... The application needs read from and write to files in >> text mode (i.e. using CRLF format). This works fine on my development >> machine, because I can just use the Cygwin setup program to specify >> the Windows text mode as default. However, when I package up my >> distribution with the Cygwin dll and install it elsewhere, the program >> writes UNIX linefeeds. > > http://www.cygwin.com/cygwin-ug-net/using-textbinary.html > > In the open() function call, binary mode can be specified with the > flag O_BINARY and text mode with O_TEXT. Alternatively, if you don't want to go through your application fixing the file open calls, you can just link it against textmode.o, which will cause all your files to be opened in textmode by default. See also http://cygwin.com/ml/cygwin/2002-10/msg00152.html cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/