[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m4-1.4.2 freeze files on cygwin
From: |
Bolo |
Subject: |
m4-1.4.2 freeze files on cygwin |
Date: |
Thu, 30 Dec 2004 11:22:22 -0600 |
I noticed a problem with m4 freeze files that occurs in the cygwin
environment. I'm using a slightly older version of cygwin;
haven't tested it against the current version. However, this is
a generic problem that can occur in any "non-unix" environment which
uses something different than newline for line endings.
The problem is that the freeze-file parser assumes that a save-file is
a unix style '\n' delimited file. However on win32 systems normal text
files are \r\n delimited .... which causes the freeze file reader
to choke when it finds a \r instead of the expected \n.
A simple solution to this is to change mode of the stdio stream with
writes the save file to binary. That way the '\n' will be there as
K&R and company intended,
In freeze.c:56, the fopen embedded in the 'if' statement ...
fopen (name, "w")
can be changed to a ...
fopen (name, "wb")
to eliminate the problem.
Bolo -- Josef T. Burger
- m4-1.4.2 freeze files on cygwin,
Bolo <=