From: Matt Wette <matt.wette@gmail.com>
To: guile-devel <guile-devel@gnu.org>
Cc: Andy Wingo <wingo@pobox.com>
Subject: Re: GNU Guile 2.1.6 released (beta) [numbers.c]
Date: Sat, 28 Jan 2017 11:29:19 -0800 [thread overview]
Message-ID: <B749A176-E2EA-4E68-88C9-93212ED7BE77@gmail.com> (raw)
In-Reply-To: <12669E32-5B1B-4FF7-9951-A15A8416013B@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
> On Jan 20, 2017, at 12:23 PM, Matt Wette <matt.wette@gmail.com> wrote:
>
>>
>> On Jan 20, 2017, at 11:01 AM, Matt Wette <matt.wette@gmail.com <mailto:matt.wette@gmail.com>> wrote:
>>
>>>
>>> On Jan 19, 2017, at 7:01 PM, Matt Wette <matt.wette@gmail.com <mailto:matt.wette@gmail.com>> wrote:
>>>
>>>
>>>> On Jan 18, 2017, at 6:26 PM, Andy Wingo <wingo@pobox.com <mailto:wingo@pobox.com>> wrote:
>>>>
>>>> We are pleased to announce GNU Guile release 2.1.6.
>>>>
>>>> Guile 2.1.6 is the sixth pre-release in what will eventually become the
>>>> 2.2 release series. We encourage you to test this release and provide
>>>> feedback to guile-devel@gnu.org <mailto:guile-devel@gnu.org>.
>>>
>>> Saw this one last round. Mac OS, now gcc-6.3.0:
>>>
>>> ;;; ("#i1@-0" 1.0 -0.0)
>>> FAIL: numbers.test: string->number: valid complex number strings
>>>
>>> I am going to see if I can generate the assembly.
>>
>> Short story: scm_c_make_polar is broken for the Mac. Guile needs to decide if it want to use __sincos() on Mac, or suppress optimization, or ...
>>
>
Attached is another patch. This one adds check for __sincos() to configure.am, configure and #ifdef to numbers.c to use __sincos() on the Mac. I don’t know if __APPLE__ is required anymore or not.
Matt
[-- Attachment #2.1: Type: text/html, Size: 3936 bytes --]
[-- Attachment #2.2: patch.__sincos --]
[-- Type: application/octet-stream, Size: 1848 bytes --]
--- libguile/numbers.c-orig 2017-01-27 16:44:27.000000000 -0800
+++ libguile/numbers.c 2017-01-27 16:47:49.000000000 -0800
@@ -9109,6 +9109,8 @@
details. */
#if (defined HAVE_SINCOS) && (defined __GLIBC__) && (defined _GNU_SOURCE)
sincos (ang, &s, &c);
+#elif (defined HAVE___SINCOS) && (defined __APPLE__)
+ __sincos (ang, &s, &c);
#else
s = sin (ang);
c = cos (ang);
@@ -9951,7 +9953,7 @@
long n_size = scm_to_long (scm_integer_length (n));
long d_size = scm_to_long (scm_integer_length (d));
- if (abs (n_size - d_size) > 1)
+ if (labs (n_size - d_size) > 1)
return (scm_difference (log_of_exact_integer (n),
log_of_exact_integer (d)));
else if (scm_is_false (scm_negative_p (n)))
--- configure.ac-orig 2017-01-27 16:42:08.000000000 -0800
+++ configure.ac 2017-01-27 16:42:45.000000000 -0800
@@ -1152,8 +1152,9 @@
# asinh, acosh, atanh, trunc - C99 standard, generally not available on
# older systems
# sincos - GLIBC extension
+# __sincos - APPLE extension
#
-AC_CHECK_FUNCS(asinh acosh atanh copysign finite sincos trunc)
+AC_CHECK_FUNCS(asinh acosh atanh copysign finite sincos __sincos trunc)
# C99 specifies isinf and isnan as macros.
# HP-UX provides only macros, no functions.
--- configure-orig 2017-01-27 16:42:14.000000000 -0800
+++ configure 2017-01-27 16:56:43.000000000 -0800
@@ -52786,8 +52786,9 @@
# asinh, acosh, atanh, trunc - C99 standard, generally not available on
# older systems
# sincos - GLIBC extension
+# __sincos - APPLE extension
#
-for ac_func in asinh acosh atanh copysign finite sincos trunc
+for ac_func in asinh acosh atanh copysign finite sincos __sincos trunc
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
[-- Attachment #2.3: Type: text/html, Size: 237 bytes --]
next prev parent reply other threads:[~2017-01-28 19:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 2:26 GNU Guile 2.1.6 released (beta) Andy Wingo
2017-01-20 3:01 ` Matt Wette
2017-01-20 19:01 ` GNU Guile 2.1.6 released (beta) [numbers.c] Matt Wette
2017-01-20 19:15 ` Amirouche
2017-01-20 20:23 ` Matt Wette
2017-01-28 19:29 ` Matt Wette [this message]
2017-01-20 14:10 ` GNU Guile 2.1.6 released (beta) Matt Wette
2017-01-25 3:35 ` Matt Wette
2017-03-09 21:33 ` Andy Wingo
2017-03-10 2:01 ` Matt Wette
2017-03-10 2:52 ` Matt Wette
2017-03-10 8:13 ` Andy Wingo
2017-03-10 13:10 ` Matt Wette
2017-02-11 20:52 ` 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=B749A176-E2EA-4E68-88C9-93212ED7BE77@gmail.com \
--to=matt.wette@gmail.com \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/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).