mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
patch 9.0.0023: on Solaris timer_create() exists but does not work
Problem: On Solaris timer_create() exists but does not work. Solution: Adjust the configure check to run the test program. (closes #10647)
This commit is contained in:
parent
95afae6d17
commit
f2ce76a8c0
36
src/auto/configure
vendored
36
src/auto/configure
vendored
@ -13041,7 +13041,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|||||||
$as_echo_n "checking for timer_create... " >&6; }
|
$as_echo_n "checking for timer_create... " >&6; }
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -lrt"
|
LIBS="$LIBS -lrt"
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
if test "$cross_compiling" = yes; then :
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
|
as_fn_error $? "cannot run test program while cross compiling
|
||||||
|
See \`config.log' for more details" "$LINENO" 5; }
|
||||||
|
else
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
#include<signal.h>
|
#include<signal.h>
|
||||||
@ -13058,18 +13064,25 @@ main ()
|
|||||||
|
|
||||||
action.sigev_notify = SIGEV_THREAD;
|
action.sigev_notify = SIGEV_THREAD;
|
||||||
action.sigev_notify_function = set_flag;
|
action.sigev_notify_function = set_flag;
|
||||||
timer_create(CLOCK_REALTIME, &action, &timer_id);
|
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
|
||||||
|
exit(1); // cannot create a monotonic timer
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -lrt" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -lrt" >&5
|
||||||
$as_echo "yes; with -lrt" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
|
$as_echo "yes; with -lrt" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
|
if test "$cross_compiling" = yes; then :
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
|
as_fn_error $? "cannot run test program while cross compiling
|
||||||
|
See \`config.log' for more details" "$LINENO" 5; }
|
||||||
|
else
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
@ -13087,13 +13100,14 @@ main ()
|
|||||||
|
|
||||||
action.sigev_notify = SIGEV_THREAD;
|
action.sigev_notify = SIGEV_THREAD;
|
||||||
action.sigev_notify_function = set_flag;
|
action.sigev_notify_function = set_flag;
|
||||||
timer_create(CLOCK_REALTIME, &action, &timer_id);
|
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
|
||||||
|
exit(1); // cannot create a monotonic timer
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
|
$as_echo "yes" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
|
||||||
|
|
||||||
@ -13101,11 +13115,15 @@ else
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
fi
|
||||||
|
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||||
|
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
|
||||||
$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
|
$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
|
||||||
|
@ -3805,10 +3805,12 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
|||||||
AC_MSG_RESULT(no))
|
AC_MSG_RESULT(no))
|
||||||
|
|
||||||
dnl Check for timer_create. It probably requires the 'rt' library.
|
dnl Check for timer_create. It probably requires the 'rt' library.
|
||||||
|
dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually
|
||||||
|
dnl works, on Solaris timer_create() exists but fails at runtime.
|
||||||
AC_MSG_CHECKING([for timer_create])
|
AC_MSG_CHECKING([for timer_create])
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="$LIBS -lrt"
|
LIBS="$LIBS -lrt"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include<signal.h>
|
#include<signal.h>
|
||||||
#include<time.h>
|
#include<time.h>
|
||||||
static void set_flag(union sigval sv) {}
|
static void set_flag(union sigval sv) {}
|
||||||
@ -3819,11 +3821,12 @@ static void set_flag(union sigval sv) {}
|
|||||||
|
|
||||||
action.sigev_notify = SIGEV_THREAD;
|
action.sigev_notify = SIGEV_THREAD;
|
||||||
action.sigev_notify_function = set_flag;
|
action.sigev_notify_function = set_flag;
|
||||||
timer_create(CLOCK_REALTIME, &action, &timer_id);
|
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
|
||||||
|
exit(1); // cannot create a monotonic timer
|
||||||
])],
|
])],
|
||||||
AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE),
|
AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE),
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include<signal.h>
|
#include<signal.h>
|
||||||
#include<time.h>
|
#include<time.h>
|
||||||
static void set_flag(union sigval sv) {}
|
static void set_flag(union sigval sv) {}
|
||||||
@ -3834,7 +3837,8 @@ static void set_flag(union sigval sv) {}
|
|||||||
|
|
||||||
action.sigev_notify = SIGEV_THREAD;
|
action.sigev_notify = SIGEV_THREAD;
|
||||||
action.sigev_notify_function = set_flag;
|
action.sigev_notify_function = set_flag;
|
||||||
timer_create(CLOCK_REALTIME, &action, &timer_id);
|
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
|
||||||
|
exit(1); // cannot create a monotonic timer
|
||||||
])],
|
])],
|
||||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE),
|
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE),
|
||||||
AC_MSG_RESULT(no)))
|
AC_MSG_RESULT(no)))
|
||||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
23,
|
||||||
/**/
|
/**/
|
||||||
22,
|
22,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user