mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add substitution code for unavailable function gettimeofday
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13563 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
47c9948cd3
commit
04998d5e37
@ -1,7 +1,8 @@
|
||||
2006-03-09 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* lib/libqof/qof/qoflog.c, gnc-date.c: Add substitution code for
|
||||
unavailable functions gettimeofday and gmtime_r.
|
||||
* lib/libqof/qof/qoflog.c, lib/libqof/qof/gnc-date.c,
|
||||
src/engine/Transaction.c: Add substitution code for unavailable
|
||||
functions gettimeofday and gmtime_r.
|
||||
|
||||
* configure.in, Makefile.am: Replace "ln -sf" by "$(LN_S) -f" for
|
||||
systems that don't have symbolic links available.
|
||||
|
@ -1029,7 +1029,12 @@ xaccTransCommitEdit (Transaction *trans)
|
||||
/* Record the time of last modification */
|
||||
if (0 == trans->date_entered.tv_sec) {
|
||||
struct timeval tv;
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
gettimeofday (&tv, NULL);
|
||||
#else
|
||||
time (&(tv.tv_sec));
|
||||
tv.tv_usec = 0;
|
||||
#endif
|
||||
trans->date_entered.tv_sec = tv.tv_sec;
|
||||
trans->date_entered.tv_nsec = 1000 * tv.tv_usec;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user