spack/var/spack/repos/builtin/packages/jq/builtinc.patch
liuyangzhuan 83f97e8eba
Adding packages for gptune and its dependencies (#26936)
* added package gptune with all its dependencies: adding py-autotune, pygmo, py-pyaml, py-autotune, py-gpy, py-lhsmdu, py-hpbandster, pagmo2, py-opentuner; modifying superlu-dist, py-scikit-optimize

* adding gptune package

* minor fix for macos spack test

* update patch for py-scikit-optimize; update test files for gptune

* fixing gptune package style error

* fixing unit tests

* a few changes reviewed in the PR

* improved gptune package.py with a few newly added/improved dependencies

* fixed a few style errors

* minor fix on package name py-pyro4

* fixing more style errors

* Update var/spack/repos/builtin/packages/py-scikit-optimize/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* resolved a few issues in the PR

* fixing file permissions

* a few minor changes

* style correction

* minor correction to jq package file

* Update var/spack/repos/builtin/packages/py-pyro4/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* fixing a few issues in the PR

* adding py-selectors34 required by py-pyro4

* improved the superlu-dist package

* improved the superlu-dist package

* moree changes to gptune and py-selectors34 based on the PR

* Update var/spack/repos/builtin/packages/py-selectors34/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-11-24 16:06:43 -06:00

49 lines
1.7 KiB
Diff

diff --git a/src/builtin.c b/src/builtin.c
old mode 100644
new mode 100755
index c6c8c2e..e336472
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -185,7 +185,7 @@ static jv f_modf(jq_state *jq, jv input) {
return jv_array_append(ret, jv_number(i));
}
#endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
static jv f_lgamma_r(jq_state *jq, jv input) {
if (jv_get_kind(input) != JV_KIND_NUMBER) {
return type_error(input, "number required");
@@ -1581,7 +1581,7 @@ static const struct cfunction function_list[] = {
#ifdef HAVE_MODF
{(cfunction_ptr)f_modf,"modf", 1},
#endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
{(cfunction_ptr)f_lgamma_r,"lgamma_r", 1},
#endif
{(cfunction_ptr)f_plus, "_plus", 3},
diff --git a/src/builtin.c b/src/builtin.c
old mode 100644
new mode 100755
index c6c8c2e..e336472
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -185,7 +185,7 @@ static jv f_modf(jq_state *jq, jv input) {
return jv_array_append(ret, jv_number(i));
}
#endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
static jv f_lgamma_r(jq_state *jq, jv input) {
if (jv_get_kind(input) != JV_KIND_NUMBER) {
return type_error(input, "number required");
@@ -1581,7 +1581,7 @@ static const struct cfunction function_list[] = {
#ifdef HAVE_MODF
{(cfunction_ptr)f_modf,"modf", 1},
#endif
-#ifdef HAVE_LGAMMA_R
+#if defined(HAVE_LGAMMA_R) && !(defined(__APPLE__) && defined(__GNUC__) && !defined(_REENTRANT))
{(cfunction_ptr)f_lgamma_r,"lgamma_r", 1},
#endif
{(cfunction_ptr)f_plus, "_plus", 3},