pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/guile20 Pull in upstream fix for mkostemp issue, ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6c96c08be013
branches:  trunk
changeset: 359371:6c96c08be013
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Mar 08 14:38:34 2017 +0000

description:
Pull in upstream fix for mkostemp issue, should fix SunOS and PR#52035.

diffstat:

 lang/guile20/distinfo                         |   4 +-
 lang/guile20/patches/patch-libguile_filesys.c |  33 +++++++++-----------------
 2 files changed, 14 insertions(+), 23 deletions(-)

diffs (60 lines):

diff -r 8ce79bea2d92 -r 6c96c08be013 lang/guile20/distinfo
--- a/lang/guile20/distinfo     Wed Mar 08 13:37:55 2017 +0000
+++ b/lang/guile20/distinfo     Wed Mar 08 14:38:34 2017 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.8 2017/02/21 15:55:28 gdt Exp $
+$NetBSD: distinfo,v 1.9 2017/03/08 14:38:34 jperkin Exp $
 
 SHA1 (guile-2.0.14.tar.gz) = fd04a4973715b8c4cd6c03a97e08d7f2c3c2bd68
 RMD160 (guile-2.0.14.tar.gz) = 754aaf1bf3c6bed9afdde49c5154b87047408a1e
 SHA512 (guile-2.0.14.tar.gz) = d69c9bdf589fedcc227f3203012f6ed11c327cef3a0147d8e016fe276abecdb4272625efe1d0c7aa68219fe8f29bbced44089a4b479e4eafe01976c6b2b83633
 Size (guile-2.0.14.tar.gz) = 7823099 bytes
 SHA1 (patch-lib_signal.in.h) = a5ddf019ed1e33b9f5b9994d1368be88660684a5
-SHA1 (patch-libguile_filesys.c) = 6274f3786b829f1007eaef362278912f1d8472cc
+SHA1 (patch-libguile_filesys.c) = 3aadb171d94e6ad583583b028b281c5f87818400
 SHA1 (patch-libguile_stime.c) = a817e58e4ec05ad040a11ccdaacca53511ad0ad8
 SHA1 (patch-libguile_threads.c) = 6250af1130fb8a6f22db4ba04c9f70bc6c9f0ade
diff -r 8ce79bea2d92 -r 6c96c08be013 lang/guile20/patches/patch-libguile_filesys.c
--- a/lang/guile20/patches/patch-libguile_filesys.c     Wed Mar 08 13:37:55 2017 +0000
+++ b/lang/guile20/patches/patch-libguile_filesys.c     Wed Mar 08 14:38:34 2017 +0000
@@ -1,28 +1,19 @@
-$NetBSD: patch-libguile_filesys.c,v 1.3 2017/02/21 15:55:28 gdt Exp $
+$NetBSD: patch-libguile_filesys.c,v 1.4 2017/03/08 14:38:34 jperkin Exp $
 
-When using mkostemp (an interface not defined by POSIX), restrict
-flags to the set defined by the documentation of particular operating
-systems.
-
-See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23 for discussion.
-
-This patch has not yet been sent upstream.
+Pull in upstream patch to fix mkostemp flags.
 
 --- libguile/filesys.c.orig    2016-12-15 00:03:33.000000000 +0000
 +++ libguile/filesys.c
-@@ -1486,6 +1486,15 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1
+@@ -1483,6 +1483,12 @@ SCM_DEFINE (scm_i_mkstemp, "mkstemp!", 1
+   else
+     {
+       open_flags = scm_i_mode_to_open_flags (mode, &is_binary, FUNC_NAME);
++      /* mkostemp(2) only defines O_APPEND, O_SYNC, and O_CLOEXEC to be
++         useful, as O_RDWR|O_CREAT|O_EXCL are implicitly added.  It also
++         notes that other flags may error on some systems, which turns
++         out to be the case.  Of those flags, O_APPEND is the only one
++         of interest anyway, so limit to that flag.  */
++      open_flags &= O_APPEND;
        mode_bits = scm_i_mode_bits (mode);
      }
  
-+#ifdef __APPLE__
-+  /* https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23 */
-+  open_flags &= O_APPEND|O_SHLOCK|O_EXLOCK|O_CLOEXEC;
-+#endif
-+#ifdef __NetBSD__
-+  /* Restrict to list of flags documented in man page. */
-+  open_flags &= O_APPEND|O_DIRECT|O_SHLOCK|O_EXLOCK|O_SYNC|O_CLOEXEC;
-+#endif
-+
-   SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
-   if (rv == -1)
-     SCM_SYSERROR;



Home | Main Index | Thread Index | Old Index