# 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
#
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 \
#endif
-#if defined HAVE_TIMES
static long ticks_per_second;
static long
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,
#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"
return result;
}
#undef FUNC_NAME
-#endif /* HAVE_TIMES */
long
scm_c_get_internal_run_time (void)
/* 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
#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)