mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Update to compile on FC5.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13688 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2006-03-23 David Hampton <david@hampton-pc.rainbolthampton.net>
|
||||
|
||||
* src/backend/postgres/checkpoint.c: Update to compile on FC5.
|
||||
|
||||
2006-03-23 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/hbci-interaction.c: Store the log level
|
||||
|
||||
@@ -71,7 +71,9 @@ static void
|
||||
pgendAccountRecomputeAllCheckpoints (PGBackend *be, const GUID *acct_guid)
|
||||
{
|
||||
Timespec this_ts, next_ts;
|
||||
#ifndef HAVE_GLIB29
|
||||
GMemChunk *chunk;
|
||||
#endif
|
||||
GList *node, *checkpoints = NULL;
|
||||
PGresult *result;
|
||||
Checkpoint *bp;
|
||||
@@ -89,7 +91,9 @@ pgendAccountRecomputeAllCheckpoints (PGBackend *be, const GUID *acct_guid)
|
||||
commodity_name =
|
||||
gnc_commodity_get_unique_name (xaccAccountGetCommodity(acc));
|
||||
|
||||
#ifndef HAVE_GLIB29
|
||||
chunk = g_mem_chunk_create (Checkpoint, 300, G_ALLOC_ONLY);
|
||||
#endif
|
||||
|
||||
/* prevent others from inserting any splits while we recompute
|
||||
* the checkpoints. (hack alert -verify that this is the correct
|
||||
@@ -111,7 +115,11 @@ pgendAccountRecomputeAllCheckpoints (PGBackend *be, const GUID *acct_guid)
|
||||
FINISH_QUERY(be->connection);
|
||||
|
||||
/* malloc a new checkpoint, set it to the dawn of unix time ... */
|
||||
#ifdef HAVE_GLIB29
|
||||
bp = g_slice_alloc0 (sizeof(Checkpoint));
|
||||
#else
|
||||
bp = g_chunk_new0 (Checkpoint, chunk);
|
||||
#endif
|
||||
checkpoints = g_list_prepend (checkpoints, bp);
|
||||
this_ts = gnc_iso8601_to_timespec_gmt (CK_EARLIEST_DATE);
|
||||
bp->date_start = this_ts;
|
||||
@@ -173,7 +181,11 @@ pgendAccountRecomputeAllCheckpoints (PGBackend *be, const GUID *acct_guid)
|
||||
bp->date_end = this_ts;
|
||||
|
||||
/* and build a new checkpoint */
|
||||
bp = g_chunk_new0 (Checkpoint, chunk);
|
||||
#ifdef HAVE_GLIB29
|
||||
bp = g_slice_alloc0 (sizeof(Checkpoint));
|
||||
#else
|
||||
bp = g_chunk_new0 (Checkpoint, chunk);
|
||||
#endif
|
||||
checkpoints = g_list_prepend (checkpoints, bp);
|
||||
bp->date_start = this_ts;
|
||||
bp->account_guid = acct_guid;
|
||||
@@ -201,7 +213,9 @@ done:
|
||||
}
|
||||
|
||||
g_list_free (checkpoints);
|
||||
#ifndef HAVE_GLIB29
|
||||
g_mem_chunk_destroy (chunk);
|
||||
#endif
|
||||
|
||||
/* finally, let the sql server do the heavy lifting of computing the
|
||||
* subtotal balances */
|
||||
|
||||
Reference in New Issue
Block a user