unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <mwette@alumni.caltech.edu>
To: 24862@debbugs.gnu.org
Subject: bug#24862: guile 2.0.13 build error under macOS 10.12 Sierra
Date: Thu, 10 Nov 2016 17:51:34 -0800	[thread overview]
Message-ID: <D0D813AD-A528-4D9D-A666-F35347783E91@alumni.caltech.edu> (raw)
In-Reply-To: <20576265-E32B-40EC-9BB9-A834D6D6E27D@alumni.caltech.edu>

Here is a patch that gets mine working.  Not sure it solves all the Sierra issues.

*** libguile/filesys.c-orig     2016-11-05 07:49:09.000000000 -0700
--- libguile/filesys.c  2016-11-10 05:38:53.000000000 -0800
***************
*** 1486,1491 ****
--- 1486,1494 ----
        mode_bits = scm_i_mode_bits (mode);
      }
  
+ #ifdef __APPLE__
+   open_flags &= O_APPEND|O_SHLOCK|O_EXLOCK|O_CLOEXEC;
+ #endif
    SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
    if (rv == -1)
      SCM_SYSERROR;

The man page for mkstemp says the following:

     The mkostemp() function is like mkstemp() but allows specifying addi-
     tional open(2) flags (defined in <fcntl.h>).  The permitted flags are
     O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.


Note that macports includes another patch for Sierra:

--- libguile/stime.c
+++ libguile/stime.c
@@ -834,6 +834,10 @@ scm_init_stime()
 
 #ifdef HAVE_POSIX_CPUTIME
   {
+#ifdef __APPLE__
+    if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0)
+      get_internal_run_time = get_internal_run_time_posix_timer;
+#else
     clockid_t dummy;
     
     /* Only use the _POSIX_CPUTIME clock if it's going to work across
@@ -843,6 +847,7 @@ scm_init_stime()
       get_internal_run_time = get_internal_run_time_posix_timer;
     else
       errno = 0;
+#endif
   }
 #endif /* HAVE_POSIX_CPUTIME */
 #endif /* HAVE_CLOCKTIME */







  parent reply	other threads:[~2016-11-11  1:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 21:18 bug#24862: guile 2.0.13 build error under macOS 10.12 Sierra Marius Schamschula
2016-11-08  1:28 ` Matt Wette
2016-11-08  2:21   ` Matt Wette
2016-11-08  2:24     ` Matt Wette
2016-11-08  2:28       ` Matt Wette
2016-11-11  1:51     ` Matt Wette [this message]
2017-03-01 13:38       ` Andy Wingo
2016-11-10  3:20 ` Matt Wette
2017-03-19 23:55 ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D0D813AD-A528-4D9D-A666-F35347783E91@alumni.caltech.edu \
    --to=mwette@alumni.caltech.edu \
    --cc=24862@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).