delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/04/22/23:12:40

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Sun, 23 Apr 2000 00:12:39 -0400
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: cygwin: php4b2 & apache1.3.9
Message-ID: <20000423001239.A5421@cygnus.com>
Reply-To: cygwin AT sourceware DOT cygnus DOT com
Mail-Followup-To: cgf AT cygnus DOT com, cygwin AT sourceware DOT cygnus DOT com
References: <00042223511350 DOT 20628 AT weba3 DOT iname DOT net>
Mime-Version: 1.0
User-Agent: Mutt/1.1.12i
In-Reply-To: <00042223511350.20628@weba3.iname.net>; from steve1800@iname.com on Sat, Apr 22, 2000 at 11:51:13PM -0400

On Sat, Apr 22, 2000 at 11:51:13PM -0400, steve1800 AT iname DOT com wrote:
>I compiled the above and everthing was running
>very smoothly untill I attemped to use the 
>php4 "Copy()" function.
>
>Copy() appears to copy the file, but it corupts the
>file in the proccess.

This is probably due to the file being opened in "text mode".
If the program is using fopen, then it needs to add a "b"
to the second argument, i.e.

fopen ("foo", "rb"); /* or */
fopen ("foo", "wb");

Without this, \n and CTRL-Z characters may cause odd things to
happen.

Christopher Faylor
Cygwin Engineering Manager (and developer)
Cygnus Solutions, a Red Hat company

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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