From dde2f4a0b846b1d819cf47881e767a2904bc16d5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 5 Jan 2002 21:53:04 +0000 Subject: [PATCH] 2002-01-05 Roland McGrath * config.h.in (HAVE_MIG_RETCODE): New #undef. * sysdeps/mach/hurd/configure.in (hurd_MIG_RETCODE: New macro swiped from hurd package's aclocal.m4; use it to set HAVE_MIG_RETCODE. * sysdeps/mach/hurd/configure: Regenerated. --- config.h.in | 3 +++ sysdeps/mach/hurd/configure | 34 ++++++++++++++++++++++++++++++++++ sysdeps/mach/hurd/configure.in | 26 ++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/config.h.in b/config.h.in index 475bd72..917674b 100644 --- a/config.h.in +++ b/config.h.in @@ -119,6 +119,9 @@ disabling the support as well. */ #undef USE_NONOPTION_FLAGS +/* Mach/Hurd specific: define if mig supports the `retcode' keyword. */ +#undef HAVE_MIG_RETCODE + /* */ diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure index 0bf3013..9265ea2 100755 --- a/sysdeps/mach/hurd/configure +++ b/sysdeps/mach/hurd/configure @@ -24,3 +24,37 @@ case "$machine" in fi ;; esac + + + +# See if mig groks `retcode'. +echo $ac_n "checking whether $MIG supports the retcode keyword""... $ac_c" 1>&6 +echo "configure:33: checking whether $MIG supports the retcode keyword" >&5 +if eval "test \"`echo '$''{'hurd_cv_mig_retcode'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.defs <<\EOF +#include +#include +subsystem foobar 1000; +type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE + ctype: mach_port_t; +simpleroutine foobar_reply ( + reply_port: reply_port_t; + err: kern_return_t, RetCode); +EOF +if { ac_try='CC="${CC}" ${MIG-false} -n conftest.defs 1>&5'; { (eval echo configure:47: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + hurd_cv_mig_retcode=yes +else + hurd_cv_mig_retcode=no +fi +rm -f conftest* +fi + +echo "$ac_t""$hurd_cv_mig_retcode" 1>&6 +if test $hurd_cv_mig_retcode = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MIG_RETCODE 1 +EOF + +fi diff --git a/sysdeps/mach/hurd/configure.in b/sysdeps/mach/hurd/configure.in index 9d023df..752366b 100644 --- a/sysdeps/mach/hurd/configure.in +++ b/sysdeps/mach/hurd/configure.in @@ -26,3 +26,29 @@ case "$machine" in fi ;; esac + +dnl Swiped from hurd/aclocal.m4 +AC_DEFUN([hurd_MIG_RETCODE], [dnl +# See if mig groks `retcode'. +AC_CACHE_CHECK(whether $MIG supports the retcode keyword, hurd_cv_mig_retcode, +[cat > conftest.defs <<\EOF +#include +#include +subsystem foobar 1000; +type reply_port_t = polymorphic | MACH_MSG_TYPE_PORT_SEND_ONCE + ctype: mach_port_t; +simpleroutine foobar_reply ( + reply_port: reply_port_t; + err: kern_return_t, RetCode); +EOF +if AC_TRY_COMMAND([CC="${CC}" ${MIG-false} -n conftest.defs 1>&AC_FD_CC]); then + hurd_cv_mig_retcode=yes +else + hurd_cv_mig_retcode=no +fi +rm -f conftest*]) +if test $hurd_cv_mig_retcode = yes; then + AC_DEFINE(HAVE_MIG_RETCODE) +fi]) + +hurd_MIG_RETCODE -- 2.7.4