octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48326] test printd fails in Win-7


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #48326] test printd fails in Win-7
Date: Mon, 11 Jul 2016 10:33:57 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

Update of bug #48326 (project octave):

                  Status:               Need Info => In Progress            

    _______________________________________________________

Follow-up Comment #11:

@Mike:
I think I nailed it down. It is mkstemp() that does not open a temp file in
binary mode as it should.

Indeed, after changing L.47 in printd.m

  [pf, tempf, mag] = mkstemp ("oct-XXXXXX", 1);


... into:

  tempf = tempname (".");
  pf = fopen (tempf, "w+b");


... printd.m PASSes its sole test.

(I'll save you the exercitions with fread before/after fclose/fopen, I think
caching and file buffers conceal what is going on)

I can't make a cset for this change right now, hopefully tonight I'll have
time. But as it is actually a bug in mkstemp, do we need a cset for printd.m
at all?
A cset a la above would make printd.m more robust.

A fix for mkstemp() is needed in any case. I can't as it's C++ stuff.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48326>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]