mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
simplify configure checks for functionality provided by gnulib
* configure.ac: Remove checks for pipe, stftime, times, and select, as our Gnulib modules already ensure they are provided. * libguile/stime.c: Rely on gnulib providing `times'.
This commit is contained in:
parent
e67cea4214
commit
32cec09d13
2 changed files with 4 additions and 27 deletions
10
configure.ac
10
configure.ac
|
@ -734,8 +734,6 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
|
|||
# has it as an inline for chsize)
|
||||
# ioctl - not in mingw.
|
||||
# gmtime_r - recent posix, not on old systems
|
||||
# pipe - not in mingw
|
||||
# _pipe - specific to mingw, taking 3 args
|
||||
# readdir_r - recent posix, not on old systems
|
||||
# readdir64_r - not available on HP-UX 11.11
|
||||
# stat64 - SuS largefile stuff, not on old systems
|
||||
|
@ -751,10 +749,10 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
|
|||
#
|
||||
AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
|
||||
fesetround ftime ftruncate fchown fchmod getcwd geteuid getsid \
|
||||
gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe \
|
||||
readdir_r readdir64_r readlink rename rmdir select setegid seteuid \
|
||||
setlocale setpgid setsid sigaction siginterrupt stat64 strftime \
|
||||
strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid \
|
||||
gettimeofday gmtime_r ioctl lstat mkdir mknod nice \
|
||||
readdir_r readdir64_r readlink rename rmdir setegid seteuid \
|
||||
setlocale setpgid setsid sigaction siginterrupt stat64 \
|
||||
strptime symlink sync sysconf tcgetpgrp tcsetpgrp uname waitpid \
|
||||
strdup system usleep atexit on_exit chown link fcntl ttyname getpwent \
|
||||
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
|
||||
index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron \
|
||||
|
|
|
@ -170,7 +170,6 @@ get_internal_real_time_gettimeofday (void)
|
|||
#endif
|
||||
|
||||
|
||||
#if defined HAVE_TIMES
|
||||
static long ticks_per_second;
|
||||
|
||||
static long
|
||||
|
@ -181,15 +180,6 @@ get_internal_run_time_times (void)
|
|||
return (time_buffer.tms_utime + time_buffer.tms_stime)
|
||||
* TIME_UNITS_PER_SECOND / ticks_per_second;
|
||||
}
|
||||
#endif
|
||||
|
||||
static timet fallback_real_time_base;
|
||||
static long
|
||||
get_internal_real_time_fallback (void)
|
||||
{
|
||||
return time_from_seconds_and_nanoseconds
|
||||
((long) time (NULL) - fallback_real_time_base, 0);
|
||||
}
|
||||
|
||||
|
||||
SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
|
||||
|
@ -203,7 +193,6 @@ SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
|
|||
#undef FUNC_NAME
|
||||
|
||||
|
||||
#ifdef HAVE_TIMES
|
||||
SCM_DEFINE (scm_times, "times", 0, 0, 0,
|
||||
(void),
|
||||
"Return an object with information about real and processor\n"
|
||||
|
@ -254,7 +243,6 @@ SCM_DEFINE (scm_times, "times", 0, 0, 0,
|
|||
return result;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
#endif /* HAVE_TIMES */
|
||||
|
||||
long
|
||||
scm_c_get_internal_run_time (void)
|
||||
|
@ -869,7 +857,6 @@ scm_init_stime()
|
|||
|
||||
/* Init ticks_per_second for scm_times, and use times(2)-based
|
||||
run-time timer if needed. */
|
||||
#ifdef HAVE_TIMES
|
||||
#ifdef _SC_CLK_TCK
|
||||
ticks_per_second = sysconf (_SC_CLK_TCK);
|
||||
#else
|
||||
|
@ -877,14 +864,6 @@ scm_init_stime()
|
|||
#endif
|
||||
if (!get_internal_run_time)
|
||||
get_internal_run_time = get_internal_run_time_times;
|
||||
#endif
|
||||
|
||||
if (!get_internal_real_time)
|
||||
/* No POSIX timers, gettimeofday doesn't work... badness! */
|
||||
{
|
||||
fallback_real_time_base = time (NULL);
|
||||
get_internal_real_time = get_internal_real_time_fallback;
|
||||
}
|
||||
|
||||
/* If we don't have a run-time timer, use real-time. */
|
||||
if (!get_internal_run_time)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue