[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
replace use of mkstemp in makeinfo.m with tmpnam/fopen ?
From: |
John W. Eaton |
Subject: |
replace use of mkstemp in makeinfo.m with tmpnam/fopen ? |
Date: |
Fri, 30 Jan 2009 13:45:41 -0500 |
On 30-Jan-2009, Benjamin Lindner wrote:
| with the current develeopment sources, makeinfo.m utilizes the function
| mkstemp to create its temporary texinfo file.
| However, mkstemp is not available on mingw32, so its call returns a file
| descriptor of -1 and subsequently, makeinfo.m fails. This means that
| help() and pring_usage() also fail.
|
| Is is acceptable to replace the call to mkstemp() with a call to
| tmpnam() and fopen() instead?
| This way, makeinfo.m does not use functions that may not be available on
| some OSes.
|
| I have attached a proposal changeset.
| This yields working makeinfo.m and thus also help() and print_usage()
| for a mingw32 platform
Would it maybe be better to use a similar method in mkstemp itself so
that it can work on systems that don't have the mkstemp library
function? I think we would need a disclaimer in the documentation
saying that on systems that don't have the mkstemp library function,
Octave's mkstemp does not have the same security properties that
mkstemp does.
jwe