Add configure test for sys/times.h and corrected guid.c to check for that.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13527 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2006-03-07 23:15:04 +00:00
parent 0b82e85a4a
commit e278c02ea0
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2006-03-08 Andreas Köhler <andi5.py@gmx.net>
* configure.in:
* lib/libqof/qof/guid.c: Add configure test for sys/times.h and
corrected guid.c to check for that.
2006-03-07 Christian Stimming <stimming@tuhh.de>
* lib/libqof/qof/guid.c: Make seed collection parts that depend on

View File

@ -91,7 +91,7 @@ AC_C_BIGENDIAN
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h)
AC_CHECK_HEADERS(limits.h sys/times.h)
AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
AC_CHECK_FUNCS(setenv,,[
AC_CHECK_FUNCS(putenv,,[

View File

@ -37,7 +37,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#ifdef HAVE_TIMES
#ifdef HAVE_SYS_TIMES_H
# include <sys/times.h>
#endif
#include <time.h>
@ -288,8 +288,8 @@ init_from_time(void)
{
size_t total;
time_t t_time;
#ifdef HAVE_SYS_TIMES_H
clock_t clocks;
#ifdef HAVE_TIMES
struct tms tms_buf;
#endif
@ -299,7 +299,7 @@ init_from_time(void)
md5_process_bytes(&t_time, sizeof(t_time), &guid_context);
total += sizeof(t_time);
#ifdef HAVE_TIMES
#ifdef HAVE_SYS_TIMES_H
clocks = times(&tms_buf);
md5_process_bytes(&clocks, sizeof(clocks), &guid_context);
md5_process_bytes(&tms_buf, sizeof(tms_buf), &guid_context);