| @@ -1,73 +1,70 @@ | | | @@ -1,73 +1,70 @@ |
1 | $NetBSD: patch-ac,v 1.13 2014/05/30 12:51:29 wiz Exp $ | | 1 | $NetBSD: patch-ac,v 1.14 2021/06/06 21:05:08 wiz Exp $ |
2 | | | 2 | |
3 | See patch-aa. | | 3 | See patch-aa. |
4 | | | 4 | |
5 | --- configure.orig 2013-09-09 01:37:35.000000000 +0000 | | 5 | --- configure.orig 2021-06-06 16:49:01.000000000 +0000 |
6 | +++ configure | | 6 | +++ configure |
7 | @@ -20104,43 +20104,18 @@ $as_echo "#define XUSE_MTSAFE_API 1" >>c | | 7 | @@ -22009,42 +22009,16 @@ printf "%s\n" "#define XUSE_MTSAFE_API 1 |
8 | ;; | | 8 | ;; |
9 | esac | | 9 | esac |
10 | | | 10 | |
11 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lc" >&5 | | 11 | -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lc" >&5 |
12 | -$as_echo_n "checking for pthread_self in -lc... " >&6; } | | 12 | -printf %s "checking for pthread_self in -lc... " >&6; } |
13 | -if ${ac_cv_lib_c_pthread_self+:} false; then : | | 13 | -if test ${ac_cv_lib_c_pthread_self+y} |
14 | - $as_echo_n "(cached) " >&6 | | 14 | +ac_fn_check_decl "$LINENO" "pthread_self" "ac_cv_have_decl_pthread_self" "#include <pthread.h> |
15 | +ac_fn_c_check_decl "$LINENO" "pthread_self" "ac_cv_have_decl_pthread_self" "#include <pthread.h> | | 15 | +" "$ac_c_undeclared_builtin_options" "CFLAGS" |
16 | +" | | 16 | +if test "x$ac_cv_have_decl_pthread_self" = xyes |
17 | +if test "x$ac_cv_have_decl_pthread_self" = xyes; then : | | 17 | then : |
| | | 18 | - printf %s "(cached) " >&6 |
18 | + ac_have_decl=1 | | 19 | + ac_have_decl=1 |
19 | else | | 20 | else $as_nop |
20 | - ac_check_lib_save_LIBS=$LIBS | | 21 | - ac_check_lib_save_LIBS=$LIBS |
21 | -LIBS="-lc $LIBS" | | 22 | -LIBS="-lc $LIBS" |
22 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | 23 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
23 | -/* end confdefs.h. */ | | 24 | -/* end confdefs.h. */ |
24 | + ac_have_decl=0 | | 25 | - |
25 | +fi | | | |
26 | | | | |
27 | -/* Override any GCC internal prototype to avoid an error. | | 26 | -/* Override any GCC internal prototype to avoid an error. |
28 | - Use char because int might match the return type of a GCC | | 27 | - Use char because int might match the return type of a GCC |
29 | - builtin and then its argument prototype would still apply. */ | | 28 | - builtin and then its argument prototype would still apply. */ |
30 | -#ifdef __cplusplus | | | |
31 | -extern "C" | | | |
32 | -#endif | | | |
33 | -char pthread_self (); | | 29 | -char pthread_self (); |
34 | -int | | 30 | -int |
35 | -main () | | 31 | -main (void) |
36 | -{ | | 32 | -{ |
37 | -return pthread_self (); | | 33 | -return pthread_self (); |
38 | - ; | | 34 | - ; |
39 | - return 0; | | 35 | - return 0; |
40 | -} | | 36 | -} |
41 | +cat >>confdefs.h <<_ACEOF | | 37 | -_ACEOF |
42 | +#define HAVE_DECL_PTHREAD_SELF $ac_have_decl | | 38 | -if ac_fn_c_try_link "$LINENO" |
43 | _ACEOF | | 39 | -then : |
44 | -if ac_fn_c_try_link "$LINENO"; then : | | | |
45 | - ac_cv_lib_c_pthread_self=yes | | 40 | - ac_cv_lib_c_pthread_self=yes |
46 | -else | | 41 | -else $as_nop |
47 | - ac_cv_lib_c_pthread_self=no | | 42 | - ac_cv_lib_c_pthread_self=no |
48 | -fi | | 43 | -fi |
49 | -rm -f core conftest.err conftest.$ac_objext \ | | 44 | -rm -f core conftest.err conftest.$ac_objext conftest.beam \ |
50 | - conftest$ac_exeext conftest.$ac_ext | | 45 | - conftest$ac_exeext conftest.$ac_ext |
51 | -LIBS=$ac_check_lib_save_LIBS | | 46 | -LIBS=$ac_check_lib_save_LIBS |
52 | -fi | | 47 | + ac_have_decl=0 |
53 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_self" >&5 | | 48 | fi |
54 | -$as_echo "$ac_cv_lib_c_pthread_self" >&6; } | | 49 | -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_self" >&5 |
55 | -if test "x$ac_cv_lib_c_pthread_self" = xyes; then : | | 50 | -printf "%s\n" "$ac_cv_lib_c_pthread_self" >&6; } |
56 | +if test $ac_have_decl = 1; then : | | 51 | -if test "x$ac_cv_lib_c_pthread_self" = xyes |
| | | 52 | +printf "%s\n" "#define HAVE_DECL_PTHREAD_SELF $ac_have_decl" >>confdefs.h |
| | | 53 | +if test $ac_have_decl = 1 |
| | | 54 | then : |
57 | thrstubs="no" | | 55 | thrstubs="no" |
58 | else | | 56 | else $as_nop |
59 | thrstubs="yes" | | 57 | @@ -22066,12 +22040,12 @@ if test x$xthreads = xyes ; then |
60 | @@ -20161,12 +20136,12 @@ if test x$xthreads = xyes ; then | | | |
61 | linux*|gnu*|k*bsd*-gnu) | | 58 | linux*|gnu*|k*bsd*-gnu) |
62 | XTHREADLIB=-lpthread ;; | | 59 | XTHREADLIB=-lpthread ;; |
63 | netbsd*) | | 60 | netbsd*) |
64 | - XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" | | 61 | - XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" |
65 | - XTHREADLIB="-lpthread" ;; | | 62 | - XTHREADLIB="-lpthread" ;; |
66 | + XTHREAD_CFLAGS="-D_REENTRANT" | | 63 | + XTHREAD_CFLAGS="-D_REENTRANT" |
67 | + XTHREADLIB="-pthread" ;; | | 64 | + XTHREADLIB="-pthread" ;; |
68 | freebsd*) | | 65 | freebsd*) |
69 | XTHREAD_CFLAGS="-D_THREAD_SAFE" | | 66 | XTHREAD_CFLAGS="-D_THREAD_SAFE" |
70 | XTHREADLIB="-pthread" ;; | | 67 | XTHREADLIB="-pthread" ;; |
71 | - dragonfly*|openbsd*) | | 68 | - dragonfly*|openbsd*) |
72 | + dragonfly*|openbsd*|mirbsd*) | | 69 | + dragonfly*|openbsd*|mirbsd*) |
73 | XTHREADLIB="-pthread" ;; | | 70 | XTHREADLIB="-pthread" ;; |