libport: Move the sigsetjmp replacement to exception.h to make it available for Winelib too.
This commit is contained in:
parent
2321017707
commit
10e795a091
|
@ -14450,69 +14450,6 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for sigsetjmp" >&5
|
||||
echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_c_sigsetjmp+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 <setjmp.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
sigjmp_buf buf;
|
||||
sigsetjmp( buf, 1 );
|
||||
siglongjmp( buf, 1 );
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
|
||||
test -z "$ac_c_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
} && test -s conftest$ac_exeext &&
|
||||
$as_test_x conftest$ac_exeext; then
|
||||
ac_cv_c_sigsetjmp="yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_c_sigsetjmp="no"
|
||||
fi
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_c_sigsetjmp" >&5
|
||||
echo "${ECHO_T}$ac_cv_c_sigsetjmp" >&6; }
|
||||
if test "$ac_cv_c_sigsetjmp" = "yes"
|
||||
then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_SIGSETJMP 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5
|
||||
echo $ECHO_N "checking for pthread_rwlock_t... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_type_pthread_rwlock_t+set}" = set; then
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -1049,17 +1049,6 @@ then
|
|||
AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
|
||||
fi
|
||||
|
||||
dnl **** Check for sigsetjmp ****
|
||||
AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]], [[sigjmp_buf buf;
|
||||
sigsetjmp( buf, 1 );
|
||||
siglongjmp( buf, 1 );]])],[ac_cv_c_sigsetjmp="yes"],[ac_cv_c_sigsetjmp="no"])
|
||||
)
|
||||
if test "$ac_cv_c_sigsetjmp" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
|
||||
fi
|
||||
|
||||
dnl **** Check for pthread_rwlock_t ****
|
||||
AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
|
||||
#include <pthread.h>])
|
||||
|
|
|
@ -615,9 +615,6 @@
|
|||
/* Define to 1 if you have the `sigprocmask' function. */
|
||||
#undef HAVE_SIGPROCMASK
|
||||
|
||||
/* Define to 1 if you have the sigsetjmp (and siglongjmp) function */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
/* Define to 1 if the system has the type `sigset_t'. */
|
||||
#undef HAVE_SIGSET_T
|
||||
|
||||
|
|
|
@ -82,6 +82,12 @@
|
|||
#define __attribute__(x) /* nothing */
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
#define sigjmp_buf jmp_buf
|
||||
#define sigsetjmp(buf,sigs) setjmp(buf)
|
||||
#define siglongjmp(buf,val) longjmp(buf,val)
|
||||
#endif
|
||||
|
||||
#define __TRY \
|
||||
do { __WINE_FRAME __f; \
|
||||
int __first = 1; \
|
||||
|
|
|
@ -323,13 +323,6 @@ ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
|
|||
int readlink( const char *path, char *buf, size_t size );
|
||||
#endif /* HAVE_READLINK */
|
||||
|
||||
#ifndef HAVE_SIGSETJMP
|
||||
# include <setjmp.h>
|
||||
typedef jmp_buf sigjmp_buf;
|
||||
int sigsetjmp( sigjmp_buf buf, int savesigs );
|
||||
void siglongjmp( sigjmp_buf buf, int val );
|
||||
#endif /* HAVE_SIGSETJMP */
|
||||
|
||||
#ifndef HAVE_STATVFS
|
||||
int statvfs( const char *path, struct statvfs *buf );
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,6 @@ C_SRCS = \
|
|||
pread.c \
|
||||
pwrite.c \
|
||||
readlink.c \
|
||||
sigsetjmp.c \
|
||||
spawn.c \
|
||||
statvfs.c \
|
||||
strcasecmp.c \
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* sigsetjmp/siglongjmp functions
|
||||
*
|
||||
* Copyright 2003 Alexandre Julliard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#ifndef HAVE_SIGSETJMP
|
||||
|
||||
int sigsetjmp( sigjmp_buf buf, int savesigs )
|
||||
{
|
||||
return setjmp( buf );
|
||||
}
|
||||
|
||||
void siglongjmp( sigjmp_buf buf, int val )
|
||||
{
|
||||
longjmp( buf, val );
|
||||
}
|
||||
|
||||
#endif /* HAVE_SIGSETJMP */
|
Loading…
Reference in New Issue