comparison src/configure.ac @ 29513:e6d788e0c121 v9.0.0098

patch 9.0.0098: missing include file in timer_create configure check Commit: https://github.com/vim/vim/commit/5748b7f2c8a8e8e6d12b3e2531df5c0261fd8f3b Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 28 12:09:04 2022 +0100 patch 9.0.0098: missing include file in timer_create configure check Problem: missing include file in timer_create configure check. Solution: Inlucde stdlib.h.
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Jul 2022 13:15:03 +0200
parents ef4f17d97ad0
children 1733b6162f75
comparison
equal deleted inserted replaced
29512:2f9709d835ac 29513:e6d788e0c121
3805 AC_MSG_RESULT(no)) 3805 AC_MSG_RESULT(no))
3806 3806
3807 dnl Check for timer_create. It probably requires the 'rt' library. 3807 dnl Check for timer_create. It probably requires the 'rt' library.
3808 dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually 3808 dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually
3809 dnl works, on Solaris timer_create() exists but fails at runtime. 3809 dnl works, on Solaris timer_create() exists but fails at runtime.
3810 AC_CACHE_CHECK([for timer_create], [vim_cv_timer_create], 3810 AC_CACHE_CHECK([for timer_create], [vim_cv_timer_create], [
3811 save_LIBS="$LIBS" 3811 save_LIBS="$LIBS"
3812 LIBS="$LIBS -lrt" 3812 LIBS="$LIBS -lrt"
3813 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 3813 AC_RUN_IFELSE([AC_LANG_PROGRAM([
3814 #include<signal.h> 3814 #if STDC_HEADERS
3815 #include<time.h> 3815 # include <stdlib.h>
3816 # include <stddef.h>
3817 #endif
3818 #include <signal.h>
3819 #include <time.h>
3816 static void set_flag(union sigval sv) {} 3820 static void set_flag(union sigval sv) {}
3817 ], [ 3821 ], [
3818 struct timespec ts; 3822 struct timespec ts;
3819 struct sigevent action = {0}; 3823 struct sigevent action = {0};
3820 timer_t timer_id; 3824 timer_t timer_id;
3825 exit(1); // cannot create a monotonic timer 3829 exit(1); // cannot create a monotonic timer
3826 ])], 3830 ])],
3827 AC_MSG_NOTICE(timer_create with -lrt); vim_cv_timer_create=yes, 3831 AC_MSG_NOTICE(timer_create with -lrt); vim_cv_timer_create=yes,
3828 LIBS="$save_LIBS" 3832 LIBS="$save_LIBS"
3829 AC_RUN_IFELSE([AC_LANG_PROGRAM([ 3833 AC_RUN_IFELSE([AC_LANG_PROGRAM([
3834 #if STDC_HEADERS
3835 # include <stdlib.h>
3836 # include <stddef.h>
3837 #endif
3830 #include<signal.h> 3838 #include<signal.h>
3831 #include<time.h> 3839 #include<time.h>
3832 static void set_flag(union sigval sv) {} 3840 static void set_flag(union sigval sv) {}
3833 ], [ 3841 ], [
3834 struct timespec ts; 3842 struct timespec ts;
3841 exit(1); // cannot create a monotonic timer 3849 exit(1); // cannot create a monotonic timer
3842 ])], 3850 ])],
3843 vim_cv_timer_create=yes, 3851 vim_cv_timer_create=yes,
3844 vim_cv_timer_create=no), 3852 vim_cv_timer_create=no),
3845 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create') 3853 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create')
3846 ) 3854 )]
3847 ) 3855 )
3848 3856
3849 if test "x$vim_cv_timer_create" = "xyes" ; then 3857 if test "x$vim_cv_timer_create" = "xyes" ; then
3850 AC_DEFINE(HAVE_TIMER_CREATE) 3858 AC_DEFINE(HAVE_TIMER_CREATE)
3851 fi 3859 fi