mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 00:40:20 +02:00
Fix mkstemp! with 1 argument
* libguile/filesys.c (scm_i_mkstemp): Add SCM_OPN to flags if mode argument not given.
This commit is contained in:
parent
0cf62c576d
commit
3f9ae30bd9
1 changed files with 3 additions and 5 deletions
|
@ -1482,7 +1482,7 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1, 1, 0,
|
||||||
flags; open_flags just adjoins flags to that set. */
|
flags; open_flags just adjoins flags to that set. */
|
||||||
open_flags = 0;
|
open_flags = 0;
|
||||||
is_binary = 0;
|
is_binary = 0;
|
||||||
mode_bits = SCM_RDNG | SCM_WRTNG;
|
mode_bits = SCM_OPN | SCM_RDNG | SCM_WRTNG;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1502,10 +1502,8 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1, 1, 0,
|
||||||
|
|
||||||
port = scm_i_fdes_to_port (rv, mode_bits, tmpl);
|
port = scm_i_fdes_to_port (rv, mode_bits, tmpl);
|
||||||
if (is_binary)
|
if (is_binary)
|
||||||
{
|
/* Use the binary-friendly ISO-8859-1 encoding. */
|
||||||
/* Use the binary-friendly ISO-8859-1 encoding. */
|
scm_i_set_port_encoding_x (port, NULL);
|
||||||
scm_i_set_port_encoding_x (port, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue