Mercurial > vim
comparison src/os_unix.c @ 32238:b2cce50602ca v9.0.1450
patch 9.0.1450: MacOS: building fails if clock_gettime() is not available
Commit: https://github.com/vim/vim/commit/08210f8def4886b0cd04dd4bbebed719f0512315
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 13 19:15:54 2023 +0100
patch 9.0.1450: MacOS: building fails if clock_gettime() is not available
Problem: MacOS: building fails if clock_gettime() is not available.
Solution: Add a configure check for clock_gettime(). (closes https://github.com/vim/vim/issues/12242)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 13 Apr 2023 20:30:03 +0200 |
parents | f3987fde6dea |
children | ca4e81de477a |
comparison
equal
deleted
inserted
replaced
32237:c9b337889ea8 | 32238:b2cce50602ca |
---|---|
8269 xsmp_icefd = -1; | 8269 xsmp_icefd = -1; |
8270 } | 8270 } |
8271 #endif // USE_XSMP | 8271 #endif // USE_XSMP |
8272 | 8272 |
8273 #if defined(FEAT_RELTIME) || defined(PROTO) | 8273 #if defined(FEAT_RELTIME) || defined(PROTO) |
8274 # if defined(HAVE_TIMER_CREATE) || defined(PROTO) | 8274 # if defined(PROF_NSEC) || defined(PROTO) |
8275 /* | 8275 /* |
8276 * Implement timeout with timer_create() and timer_settime(). | 8276 * Implement timeout with timer_create() and timer_settime(). |
8277 */ | 8277 */ |
8278 static volatile sig_atomic_t timeout_flag = FALSE; | 8278 static volatile sig_atomic_t timeout_flag = FALSE; |
8279 static timer_t timer_id; | 8279 static timer_t timer_id; |
8369 | 8369 |
8370 timer_delete(timer_id); | 8370 timer_delete(timer_id); |
8371 timer_created = FALSE; | 8371 timer_created = FALSE; |
8372 } | 8372 } |
8373 | 8373 |
8374 # else // HAVE_TIMER_CREATE | 8374 # else // PROF_NSEC |
8375 | 8375 |
8376 /* | 8376 /* |
8377 * Implement timeout with setitimer() | 8377 * Implement timeout with setitimer() |
8378 */ | 8378 */ |
8379 static struct sigaction prev_sigaction; | 8379 static struct sigaction prev_sigaction; |
8494 } | 8494 } |
8495 | 8495 |
8496 timer_active = TRUE; | 8496 timer_active = TRUE; |
8497 return &timeout_flag; | 8497 return &timeout_flag; |
8498 } | 8498 } |
8499 # endif // HAVE_TIMER_CREATE | 8499 # endif // PROF_NSEC |
8500 #endif // FEAT_RELTIME | 8500 #endif // FEAT_RELTIME |