From 4b6ee0536b49e64e0c391ac387038aa6ba1349eb Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 24 Jan 2021 17:56:34 +0100 Subject: [PATCH 1/2] gmp: configure: add missing include files --- src/gmp/acinclude.m4 | 4 ++++ src/gmp/configure | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/gmp/acinclude.m4 b/src/gmp/acinclude.m4 index df003603..310176f1 100644 --- a/src/gmp/acinclude.m4 +++ b/src/gmp/acinclude.m4 @@ -3486,6 +3486,7 @@ else AC_TRY_RUN([ #include /* for strcmp */ #include /* for vsnprintf */ +#include /* for exit */ #if HAVE_STDARG #include @@ -3659,6 +3660,7 @@ AC_DEFUN([GMP_PROG_CC_FOR_BUILD_WORKS], # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c < int main () { @@ -3733,6 +3735,7 @@ AC_DEFUN([GMP_PROG_EXEEXT_FOR_BUILD], AC_CACHE_CHECK([for build system executable suffix], gmp_cv_prog_exeext_for_build, [cat >conftest.c < int main () { @@ -3769,6 +3772,7 @@ AC_DEFUN([GMP_CHECK_LIBM_FOR_BUILD], AC_CACHE_CHECK([for build system compiler math library], gmp_cv_check_libm_for_build, [cat >conftest.c < int main () { diff --git a/src/gmp/configure b/src/gmp/configure index 66b4f9b5..fd0242e5 100755 --- a/src/gmp/configure +++ b/src/gmp/configure @@ -783,6 +783,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -880,6 +881,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1132,6 +1134,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1269,7 +1280,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1422,6 +1433,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -9248,6 +9260,7 @@ $as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c < int main () { @@ -9280,6 +9293,7 @@ $as_echo_n "checking build system compiler $HOST_CC... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c < int main () { @@ -9313,6 +9327,7 @@ $as_echo_n "checking build system compiler $i... " >&6; } # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c < int main () { @@ -9392,6 +9407,7 @@ if ${gmp_cv_prog_exeext_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c < int main () { @@ -9429,6 +9445,7 @@ if ${gmp_cv_check_libm_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c < int main () { From da807da49adec8c69ab41cffa3950a5b68b2dc61 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sun, 24 Jan 2021 18:00:17 +0100 Subject: [PATCH 2/2] internal.h: fix ifdef for mp_get_rwlock_{read,write}_wait rwlocks are emulated using standard locks if no OS primitive for them exists, therefore we need the declarations in any case. --- src/h/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h/internal.h b/src/h/internal.h index 19a47486..9237241c 100755 --- a/src/h/internal.h +++ b/src/h/internal.h @@ -490,7 +490,7 @@ extern cl_object ecl_waiter_pop(cl_env_ptr the_env, cl_object q); /* threads/rwlock.d */ -#ifdef ECL_RWLOCK +#ifdef ECL_THREADS extern cl_object mp_get_rwlock_read_wait(cl_object lock); extern cl_object mp_get_rwlock_write_wait(cl_object lock); #endif