fopen always returns fid=-1 since revision 8380
Thomas Treichl
Thomas.Treichl at gmx.net
Mon Dec 8 01:56:51 CST 2008
Hi,
with revision 8380, "allow initialized local buffers", there came a strange
problem with it. I don't see this problem with revision 8379. Because this
changeset is very small I hope somebody can tell me what is going on.
If I do
fid = fopen ("file.txt", "w")
then I always get a fid=-1 if the file is not there and must be created. If the
file is already there then it can be opened correctly for overwriting and I get
a valid fid.
I noticed that problem because the number of failures while doing "make check"
increased rapidly from revision 8379 to 8380, for example
>>>>> processing /Users/Thomas/Development/octave/src/DLD-FUNCTIONS/dlmread.cc
***** shared file
file = tmpnam ();
fid = fopen (file, "wt");
fwrite (fid, "1, 2, 3\n4, 5, 6\n7, 8, 9\n10, 11, 12");
fclose (fid);
!!!!! test failed
fwrite: invalid stream number = -1shared variables {
file = [](0x0)
}
dlmread.cc on its own produces 20 failures on my Mac. Which line of changeset
8380 could make that problems?
Thanks for help,
Thomas
More information about the Octave-maintainers
mailing list