Alexandre Julliard : configure: Check for unw_step() instead of unw_getcontext().

Alexandre Julliard julliard at winehq.org
Thu Sep 12 16:28:56 CDT 2019


Module: wine
Branch: master
Commit: 4c0f59ddbc863976a21bfceacf5b65157efbb421
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4c0f59ddbc863976a21bfceacf5b65157efbb421

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep 12 11:38:30 2019 +0200

configure: Check for unw_step() instead of unw_getcontext().

unw_getcontext() can be inlined.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure    | 40 ++++++++++++++++++++--------------------
 configure.ac | 22 +++++++++++-----------
 2 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/configure b/configure
index 83d8591c1d..109d2423a2 100755
--- a/configure
+++ b/configure
@@ -14893,9 +14893,9 @@ $as_echo "$as_me:${as_lineno-$LINENO}: libunwind cflags: $UNWIND_CFLAGS" >&5
 $as_echo "$as_me:${as_lineno-$LINENO}: libunwind libs: $UNWIND_LIBS" >&5
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $UNWIND_CFLAGS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_getcontext" >&5
-$as_echo_n "checking for unw_getcontext... " >&6; }
-if ${wine_cv_have_unw_getcontext+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_step" >&5
+$as_echo_n "checking for unw_step... " >&6; }
+if ${wine_cv_have_unw_step+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14905,28 +14905,28 @@ else
 int
 main ()
 {
-unw_context_t context; unw_getcontext( &context );
+unw_context_t context; unw_step( &context );
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  wine_cv_have_unw_getcontext="yes"
+  wine_cv_have_unw_step="yes"
 else
-  wine_cv_have_unw_getcontext="no"
+  wine_cv_have_unw_step="no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_unw_getcontext" >&5
-$as_echo "$wine_cv_have_unw_getcontext" >&6; }
-        if test "$wine_cv_have_unw_getcontext" = no -a -n "$UNWIND_LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_unw_step" >&5
+$as_echo "$wine_cv_have_unw_step" >&6; }
+        if test "$wine_cv_have_unw_step" = no -a -n "$UNWIND_LIBS"
         then
             save_libs=$LIBS
             LIBS="$UNWIND_LIBS $LIBS"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_getcontext in libunwind" >&5
-$as_echo_n "checking for unw_getcontext in libunwind... " >&6; }
-if ${wine_cv_have_libunwind_unw_getcontext+:} false; then :
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_step in libunwind" >&5
+$as_echo_n "checking for unw_step in libunwind... " >&6; }
+if ${wine_cv_have_libunwind_unw_step+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14936,25 +14936,25 @@ else
 int
 main ()
 {
-unw_context_t context; unw_getcontext( &context );
+unw_context_t context; unw_step( &context );
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  wine_cv_have_libunwind_unw_getcontext="yes"
+  wine_cv_have_libunwind_unw_step="yes"
 else
-  wine_cv_have_libunwind_unw_getcontext="no"
+  wine_cv_have_libunwind_unw_step="no"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_libunwind_unw_getcontext" >&5
-$as_echo "$wine_cv_have_libunwind_unw_getcontext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_libunwind_unw_step" >&5
+$as_echo "$wine_cv_have_libunwind_unw_step" >&6; }
             LIBS=$save_libs
         fi
-        test "$wine_cv_have_libunwind_unw_getcontext" = yes || UNWIND_LIBS=""
-        if test "x$wine_cv_have_unw_getcontext$wine_cv_have_libunwind_unw_getcontext" != xnono
+        test "$wine_cv_have_libunwind_unw_step" = yes || UNWIND_LIBS=""
+        if test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono
         then
 
 $as_echo "#define HAVE_LIBUNWIND 1" >>confdefs.h
@@ -14967,7 +14967,7 @@ test -z "$UNWIND_LIBS" || UNWIND_LIBS=`echo " $UNWIND_LIBS" | sed 's/ -L\([^/]\)
 fi
 case $host in
   aarch64*|*-darwin*)
-    if test "x$wine_cv_have_unw_getcontext$wine_cv_have_libunwind_unw_getcontext" != xnono; then :
+    if test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono; then :
   case "x$with_unwind" in
   x)   as_fn_append wine_notices "|libunwind ${notice_platform}development files not found, stack unwinding won't work." ;;
   xno) ;;
diff --git a/configure.ac b/configure.ac
index b39b6b2c90..dfa6b6ac9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1694,32 +1694,32 @@ dnl **** Check for libuwind ****
 if test "x$with_unwind" != xno
 then
     WINE_PACKAGE_FLAGS(UNWIND,[libunwind],[-lunwind],,,
-       [AC_CACHE_CHECK([for unw_getcontext],wine_cv_have_unw_getcontext,
+       [AC_CACHE_CHECK([for unw_step],wine_cv_have_unw_step,
            [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define UNW_LOCAL_ONLY
 #include <libunwind.h>]],
-                [[unw_context_t context; unw_getcontext( &context );]])],
-                [wine_cv_have_unw_getcontext="yes"],[wine_cv_have_unw_getcontext="no"])])
-        if test "$wine_cv_have_unw_getcontext" = no -a -n "$UNWIND_LIBS"
+                [[unw_context_t context; unw_step( &context );]])],
+                [wine_cv_have_unw_step="yes"],[wine_cv_have_unw_step="no"])])
+        if test "$wine_cv_have_unw_step" = no -a -n "$UNWIND_LIBS"
         then
             save_libs=$LIBS
             LIBS="$UNWIND_LIBS $LIBS"
-            AC_CACHE_CHECK([for unw_getcontext in libunwind],wine_cv_have_libunwind_unw_getcontext,
+            AC_CACHE_CHECK([for unw_step in libunwind],wine_cv_have_libunwind_unw_step,
                [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define UNW_LOCAL_ONLY
 #include <libunwind.h>]],
-                    [[unw_context_t context; unw_getcontext( &context );]])],
-                    [wine_cv_have_libunwind_unw_getcontext="yes"],
-                    [wine_cv_have_libunwind_unw_getcontext="no"])])
+                    [[unw_context_t context; unw_step( &context );]])],
+                    [wine_cv_have_libunwind_unw_step="yes"],
+                    [wine_cv_have_libunwind_unw_step="no"])])
             LIBS=$save_libs
         fi
-        test "$wine_cv_have_libunwind_unw_getcontext" = yes || UNWIND_LIBS=""
-        if test "x$wine_cv_have_unw_getcontext$wine_cv_have_libunwind_unw_getcontext" != xnono
+        test "$wine_cv_have_libunwind_unw_step" = yes || UNWIND_LIBS=""
+        if test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono
         then
             AC_DEFINE(HAVE_LIBUNWIND,1,[Define to 1 if you have the `unwind' library (-lunwind).])
         fi])
 fi
 case $host in
   aarch64*|*-darwin*)
-    WINE_NOTICE_WITH(unwind,[test "x$wine_cv_have_unw_getcontext$wine_cv_have_libunwind_unw_getcontext" != xnono],
+    WINE_NOTICE_WITH(unwind,[test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" != xnono],
                      [libunwind ${notice_platform}development files not found, stack unwinding won't work.]) ;;
 esac
 




More information about the wine-cvs mailing list