Revision: 3228 Author: eliot Date: 2015-01-13 10:10:05 -0800 (Tue, 13 Jan 2015) Log Message: ----------- Add a processor-agnostic include file for alien callouts and callbacks. Needed for linux where host_cpu and build_cpu are not necessarily the target cpu. Add some support for identifying the presence of epoll_wait & epoll_pwait on linux.
Modified Paths: -------------- branches/Cog/platforms/unix/config/acinclude.m4 branches/Cog/platforms/unix/config/config.h.in branches/Cog/platforms/unix/config/configure branches/Cog/platforms/unix/config/configure.ac branches/Cog/platforms/unix/plugins/IA32ABI/acinclude.m4
Added Paths: ----------- branches/Cog/platforms/unix/config/ax_have_epoll.m4
Property Changed: ---------------- branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h ___________________________________________________________________ Modified: checkindate - Fri Jan 9 14:03:48 PST 2015 + Tue Jan 13 10:08:57 PST 2015
Modified: branches/Cog/platforms/unix/config/acinclude.m4 =================================================================== --- branches/Cog/platforms/unix/config/acinclude.m4 2015-01-13 18:04:53 UTC (rev 3227) +++ branches/Cog/platforms/unix/config/acinclude.m4 2015-01-13 18:10:05 UTC (rev 3228) @@ -286,3 +286,6 @@ plibs="${plibs} $1", AC_MSG_RESULT([******** disabling ${plugin} due to missing libraries]) disabled_plugins="${disabled_plugins} ${plugin}")]) + +# Recent Unix stuff +m4_include([ax_have_epoll.m4])
Added: branches/Cog/platforms/unix/config/ax_have_epoll.m4 =================================================================== --- branches/Cog/platforms/unix/config/ax_have_epoll.m4 (rev 0) +++ branches/Cog/platforms/unix/config/ax_have_epoll.m4 2015-01-13 18:10:05 UTC (rev 3228) @@ -0,0 +1,104 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# DESCRIPTION +# +# This macro determines whether the system supports the epoll I/O event +# interface. A neat usage example would be: +# +# AX_HAVE_EPOLL( +# [AX_CONFIG_FEATURE_ENABLE(epoll)], +# [AX_CONFIG_FEATURE_DISABLE(epoll)]) +# AX_CONFIG_FEATURE( +# [epoll], [This platform supports epoll(7)], +# [HAVE_EPOLL], [This platform supports epoll(7).]) +# +# The epoll interface was added to the Linux kernel in version 2.5.45, and +# the macro verifies that a kernel newer than this is installed. This +# check is somewhat unreliable if <linux/version.h> doesn't match the +# running kernel, but it is necessary regardless, because glibc comes with +# stubs for the epoll_create(), epoll_wait(), etc. that allow programs to +# compile and link even if the kernel is too old; the problem would then +# be detected only at runtime. +# +# Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to +# epoll_wait(). The availability of that function can be tested with the +# second macro. Generally speaking, it is safe to assume that +# AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the +# other way round. +# +# LICENSE +# +# Copyright (c) 2008 Peter Simons simons@cryp.to +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + +AC_DEFUN([AX_HAVE_EPOLL], [dnl + ax_have_epoll_cppflags="${CPPFLAGS}" + AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) + AC_MSG_CHECKING([for Linux epoll(7) interface]) + AC_CACHE_VAL([ax_cv_have_epoll], [dnl + AC_LINK_IFELSE([dnl + AC_LANG_PROGRAM([dnl +#include <sys/epoll.h> +#ifdef HAVE_LINUX_VERSION_H +# include <linux/version.h> +# if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) +# error linux kernel version is too old to have epoll +# endif +#endif +], [dnl +int fd, rc; +struct epoll_event ev; +fd = epoll_create(128); +rc = epoll_wait(fd, &ev, 1, 0);])], + [ax_cv_have_epoll=yes], + [ax_cv_have_epoll=no])]) + CPPFLAGS="${ax_have_epoll_cppflags}" + AS_IF([test "${ax_cv_have_epoll}" = "yes"], + [AC_MSG_RESULT([yes]) +$1],[AC_MSG_RESULT([no]) +$2]) +])dnl + +AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl + ax_have_epoll_cppflags="${CPPFLAGS}" + AC_CHECK_HEADER([linux/version.h], + [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) + AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension]) + AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl + AC_LINK_IFELSE([dnl + AC_LANG_PROGRAM([dnl +#ifdef HAVE_LINUX_VERSION_H +# include <linux/version.h> +# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +# error linux kernel version is too old to have epoll_pwait +# endif +#endif +#include <sys/epoll.h> +#include <signal.h> +], [dnl +int fd, rc; +struct epoll_event ev; +fd = epoll_create(128); +rc = epoll_wait(fd, &ev, 1, 0); +rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])], + [ax_cv_have_epoll_pwait=yes], + [ax_cv_have_epoll_pwait=no])]) + CPPFLAGS="${ax_have_epoll_cppflags}" + AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"], + [AC_MSG_RESULT([yes]) +$1],[AC_MSG_RESULT([no]) +$2]) +])dnl
Modified: branches/Cog/platforms/unix/config/config.h.in =================================================================== --- branches/Cog/platforms/unix/config/config.h.in 2015-01-13 18:04:53 UTC (rev 3227) +++ branches/Cog/platforms/unix/config/config.h.in 2015-01-13 18:10:05 UTC (rev 3228) @@ -112,6 +112,9 @@ #undef HAVE_ALLOCA #undef HAVE_ALLOCA_H
+#undef HAVE_EPOLL +#undef HAVE_EPOLL_PWAIT + #undef HAVE_UNSETENV
#undef HAVE_NANOSLEEP
Modified: branches/Cog/platforms/unix/config/configure =================================================================== --- branches/Cog/platforms/unix/config/configure 2015-01-13 18:04:53 UTC (rev 3227) +++ branches/Cog/platforms/unix/config/configure 2015-01-13 18:10:05 UTC (rev 3228) @@ -23764,7 +23764,445 @@
fi
+ ax_have_epoll_cppflags="${CPPFLAGS}" + if test "${ac_cv_header_linux_version_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <linux/version.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5
+ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <linux/version.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: "$ac_cpp conftest.$ac_ext"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section "Present But Cannot Be Compiled"" >&5 +echo "$as_me: WARNING: linux/version.h: section "Present But Cannot Be Compiled"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6 + +fi +if test $ac_cv_header_linux_version_h = yes; then + CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" +fi + + + echo "$as_me:$LINENO: checking for Linux epoll(7) interface" >&5 +echo $ECHO_N "checking for Linux epoll(7) interface... $ECHO_C" >&6 + if test "${ax_cv_have_epoll+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/epoll.h> +#ifdef HAVE_LINUX_VERSION_H +# include <linux/version.h> +# if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) +# error linux kernel version is too old to have epoll +# endif +#endif + +int +main () +{ +int fd, rc; +struct epoll_event ev; +fd = epoll_create(128); +rc = epoll_wait(fd, &ev, 1, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: "$ac_link"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; }; then + ax_cv_have_epoll=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ax_cv_have_epoll=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + CPPFLAGS="${ax_have_epoll_cppflags}" + if test "${ax_cv_have_epoll}" = "yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi + + + ax_have_epoll_cppflags="${CPPFLAGS}" + if test "${ac_cv_header_linux_version_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/version.h usability" >&5 +echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <linux/version.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking linux/version.h presence" >&5 +echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <linux/version.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: "$ac_cpp conftest.$ac_ext"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: section "Present But Cannot Be Compiled"" >&5 +echo "$as_me: WARNING: linux/version.h: section "Present But Cannot Be Compiled"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/version.h" >&5 +echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_version_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_version_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6 + +fi +if test $ac_cv_header_linux_version_h = yes; then + CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" +fi + + + echo "$as_me:$LINENO: checking for Linux epoll(7) interface with signals extension" >&5 +echo $ECHO_N "checking for Linux epoll(7) interface with signals extension... $ECHO_C" >&6 + if test "${ax_cv_have_epoll_pwait+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_LINUX_VERSION_H +# include <linux/version.h> +# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +# error linux kernel version is too old to have epoll_pwait +# endif +#endif +#include <sys/epoll.h> +#include <signal.h> + +int +main () +{ +int fd, rc; +struct epoll_event ev; +fd = epoll_create(128); +rc = epoll_wait(fd, &ev, 1, 0); +rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: "$ac_link"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: $? = $ac_status" >&5 + (exit $ac_status); }; }; then + ax_cv_have_epoll_pwait=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ax_cv_have_epoll_pwait=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + CPPFLAGS="${ax_have_epoll_cppflags}" + if test "${ax_cv_have_epoll_pwait}" = "yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi + + + # Checks for platform characteristics.
echo "$as_me:$LINENO: checking for $host_cpu optimisation flags" >&5 @@ -27784,20 +28222,8 @@ plugin="IA32ABI" plibs="" rm -f IA32ABI.sub IA32ABI.lib -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o" +ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o xabicc.o"
-case $host_cpu in -i386|i486|i586|i686) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ia32abicc.o" -;; -powerpc|ppc) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ppcia32abicc.o" -;; -x86_64|x64) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o x64ia32abicc.o" -;; -esac - IA32ABI_OBJS=$ia32abi_objs
if test "${plibs}"; then
Modified: branches/Cog/platforms/unix/config/configure.ac =================================================================== --- branches/Cog/platforms/unix/config/configure.ac 2015-01-13 18:04:53 UTC (rev 3227) +++ branches/Cog/platforms/unix/config/configure.ac 2015-01-13 18:10:05 UTC (rev 3228) @@ -286,6 +286,8 @@
AC_FUNC_MMAP AC_FUNC_ALLOCA +AX_HAVE_EPOLL +AX_HAVE_EPOLL_PWAIT
# Checks for platform characteristics.
Modified: branches/Cog/platforms/unix/plugins/IA32ABI/acinclude.m4 =================================================================== --- branches/Cog/platforms/unix/plugins/IA32ABI/acinclude.m4 2015-01-13 18:04:53 UTC (rev 3227) +++ branches/Cog/platforms/unix/plugins/IA32ABI/acinclude.m4 2015-01-13 18:10:05 UTC (rev 3228) @@ -1,15 +1,3 @@ -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o" +ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o xabicc.o"
-case $host_cpu in -i386|i486|i586|i686) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ia32abicc.o" -;; -powerpc|ppc) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o ppcia32abicc.o" -;; -x86_64|x64) -ia32abi_objs="IA32ABI.o AlienSUnitTestProcedures.o x64ia32abicc.o" -;; -esac - AC_SUBST(IA32ABI_OBJS, $ia32abi_objs)
vm-dev@lists.squeakfoundation.org