This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: cygwin: php4b2 & apache1.3.9
- To: cygwin at sourceware dot cygnus dot com
- Subject: Re: cygwin: php4b2 & apache1.3.9
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Sun, 23 Apr 2000 00:12:39 -0400
- References: <00042223511350.20628@weba3.iname.net>
- Reply-To: cygwin at sourceware dot cygnus dot com
On Sat, Apr 22, 2000 at 11:51:13PM -0400, steve1800@iname.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@sourceware.cygnus.com