Mail Archives: cygwin/1999/06/21/10:23:40
--- Ulrich Koehler <koehler AT mvt DOT tu-clausthal DOT de> wrote:
> Hello,
>
> first of all: thank you for your help!
> This RTFM! goes to me. I was not aware of the CR/LF
> problem and the differences between text and binary
> mode because I never browsed through the documentation.
> I did not even know that you can open files in text-mode,
> it sounds like a strange idea to me. Because I'm working
> on many platforms, I create and edit only text files with
> UNIX-style line-endings on Windows and I'm trying to keep
> my environment CR/LF-free.
>
Welcome to the world of portable programming.
> Will I experience problems within the cygwin-environment,
> if I use only text=binary mounts?
>
Yes. If the script files contain \r\n line endings then bash and sh will
properly execute them. Don't change to text=binary in order to become lazy. I
always suggest that you leave it witht the text!=binary default.
> BTW:
> I've changed the single open() call in the libtiff-source to
> open the file as binary ( If I remember correctly the value
> O_BINARY is defined, I added '|0x100000' to the mode bits).
> It now seems to work now even with
> my default text!=binary mount. I could compile and link
> my application and used it without problems.
Good.
> I wrote 'it seems to work', because the 'thumbnail' binary
> still does not work. Maybe there is another reason why,
> 'tiff2ps' does work.
If it uses the fopen call you would use "rb" in the function instead of just
"r" to open in binary mode. Unfortunately there isn't a "rt" equivalent for
text mode. You can use though the setmode function to set either _O_BINARY or
_O_TEXT mode after the open call before reading/writing anything into the
buffer.
> I do not have the knowlegde to make a complete port using
> the configure script and I still want to be sure that I did
> the right thing.
I'm just learning the autoconf configure script language myself. Shouldn't be
too difficult to learn. Just start small and grow big.
===
Earnie Boyd <mailto:earnie_boyd AT yahoo DOT com>
Newbies, please visit
<http://www.freeyellow.com/members5/gw32/index.html>
(If you respond to the list, then please don't include me)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -