[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Fix mkstemp! with 1 argument
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/01: Fix mkstemp! with 1 argument |
Date: |
Sat, 16 Jul 2016 13:47:28 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit 3f9ae30bd9628416f766ff7e2d6bc422e0bad8ca
Author: Andy Wingo <address@hidden>
Date: Sat Jul 16 15:45:37 2016 +0200
Fix mkstemp! with 1 argument
* libguile/filesys.c (scm_i_mkstemp): Add SCM_OPN to flags if mode
argument not given.
---
libguile/filesys.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/libguile/filesys.c b/libguile/filesys.c
index b5f5c79..935f6de 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1482,7 +1482,7 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1, 1, 0,
flags; open_flags just adjoins flags to that set. */
open_flags = 0;
is_binary = 0;
- mode_bits = SCM_RDNG | SCM_WRTNG;
+ mode_bits = SCM_OPN | SCM_RDNG | SCM_WRTNG;
}
else
{
@@ -1502,10 +1502,8 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1, 1, 0,
port = scm_i_fdes_to_port (rv, mode_bits, tmpl);
if (is_binary)
- {
- /* Use the binary-friendly ISO-8859-1 encoding. */
- scm_i_set_port_encoding_x (port, NULL);
- }
+ /* Use the binary-friendly ISO-8859-1 encoding. */
+ scm_i_set_port_encoding_x (port, NULL);
return port;
}