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:
@@ -1,7 +1,8 @@
|
|||||||
2006-03-09 Christian Stimming <stimming@tuhh.de>
|
2006-03-09 Christian Stimming <stimming@tuhh.de>
|
||||||
|
|
||||||
* lib/libqof/qof/qoflog.c, gnc-date.c: Add substitution code for
|
* lib/libqof/qof/qoflog.c, lib/libqof/qof/gnc-date.c,
|
||||||
unavailable functions gettimeofday and gmtime_r.
|
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
|
* configure.in, Makefile.am: Replace "ln -sf" by "$(LN_S) -f" for
|
||||||
systems that don't have symbolic links available.
|
systems that don't have symbolic links available.
|
||||||
|
|||||||
@@ -1029,7 +1029,12 @@ xaccTransCommitEdit (Transaction *trans)
|
|||||||
/* Record the time of last modification */
|
/* Record the time of last modification */
|
||||||
if (0 == trans->date_entered.tv_sec) {
|
if (0 == trans->date_entered.tv_sec) {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
#ifdef HAVE_GETTIMEOFDAY
|
||||||
gettimeofday (&tv, NULL);
|
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_sec = tv.tv_sec;
|
||||||
trans->date_entered.tv_nsec = 1000 * tv.tv_usec;
|
trans->date_entered.tv_nsec = 1000 * tv.tv_usec;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user