This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: Problem with F:/ and /cygdrive/f/ solved!
- To: "Joey Mukherjee" <joey at swri dot org>,<cygwin at sources dot redhat dot com>
- Subject: Re: Problem with F:/ and /cygdrive/f/ solved!
- From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- Date: Mon, 15 Jan 2001 14:49:06 -0500
At 02:15 PM 1/15/2001, Joey Mukherjee wrote:
>Thanks for all the help on the F:/ and /cygdrive/f/ difference and as many
>had noted, it was indeed the O_BINARY flag which can make the difference. I
>did search the FAQ before posting but missed it since the answer was hidden
>under the "DOS/Unix to CR/LF" question which I did not think was my problem.
>
>However, is O_BINARY a standard flag for open? Adding that flag on Solaris
>seems to fail in compile since that symbol is not defined or mentioned in
>the open man page. I'd hate to add #ifdef around every open...
O_BINARY should be standard, but I'm no expert at standards. You could
probably track down the precise wording as well as I if you're interested.
In any case, there's no need to #ifdef every open call. Simply add O_BINARY
and define it as appropriate for the platform you're on, assuming its not
already defined, in a header file of your choosing. You can also look for
_O_BINARY.
>Why is text mode the default for open? Wouldn't one use fopen for text
>processing and open for binary?
Apparently not. The requirements are historical so trying to make any
sense of them is a loosing battle. Don't let that stop you though if you're
so inclined!;-)
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
118 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple