Mail Archives: cygwin/2003/04/08/09:50:04
On 8 Apr, Ronald Landheer-Cieslak wrote:
| I've grepped your code for the usual binmode vs textmode problem - every
| fopen you call is in the "default" mode, which may be textmode.
| In textmode, \n will be translated to \r\n when saving, which will corrupt
| your (binary) files.
| Add a "b" to the open options in each fopen call - this will not disturb
| anything on any other platform, and probably fix your problem :)
|
| HTH
|
| rlc
|
|
It was a good thought and a careless oversight on my part, but it is not the
cause of this problem. Most of the instances where fopen is used is in a test
function. For each module, I write a main() program that tests the
functionality. These are only compiled if you compile the code with
-DTEST_MODULENAME
Otherwise, they are masked out. There was one instance where the fopen thingy
could have bitten me (in token.c) and I updated that.
Again, thanks for the suggestion, but it didn't fix the problem.
A gentleman named Andrew Markebo contacted me yesterday and asked if I tried
using Purify or some similar tool. I didn't respond to the list as well as to
him, so I wanted to say something about that. I have compiled the code and
used valgrind and ElectricFence on Linux. When I used valgrind, it did find
some issues that I fixed (this was some months ago - it is listed in the
CHANGELOG).
I read some about ElectricFence being available for cygwin...there was even an
entry where the URL for a binary was available, but the binary wasn't there.
Has there been any more effort porting ElectricFence to Cygwin? The stock
ElectricFence v.2.1 from perens.com does not work out of the box on Cygwin. I
would certainly be interested if it is available.
Thanks again for the suggestions.
--
=================================
David May
Senior UNIX System Administrator
Albuquerque TVI
505-224-3015
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -