[Gnucash-changes] r13688 - gnucash/trunk - Update to compile on FC5.

David Hampton hampton at cvs.gnucash.org
Thu Mar 23 11:01:18 EST 2006


Author: hampton
Date: 2006-03-23 11:01:17 -0500 (Thu, 23 Mar 2006)
New Revision: 13688
Trac: http://svn.gnucash.org/trac/changeset/13688

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/backend/postgres/checkpoint.c
Log:
Update to compile on FC5.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-03-23 12:12:48 UTC (rev 13687)
+++ gnucash/trunk/ChangeLog	2006-03-23 16:01:17 UTC (rev 13688)
@@ -1,3 +1,7 @@
+2006-03-23  David Hampton  <david at hampton-pc.rainbolthampton.net>
+
+	* src/backend/postgres/checkpoint.c: Update to compile on FC5.
+
 2006-03-23  Christian Stimming <stimming at tuhh.de>
 
 	* src/import-export/hbci/hbci-interaction.c: Store the log level

Modified: gnucash/trunk/src/backend/postgres/checkpoint.c
===================================================================
--- gnucash/trunk/src/backend/postgres/checkpoint.c	2006-03-23 12:12:48 UTC (rev 13687)
+++ gnucash/trunk/src/backend/postgres/checkpoint.c	2006-03-23 16:01:17 UTC (rev 13688)
@@ -71,7 +71,9 @@
 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 @@
    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 @@
    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 @@
          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 @@
    }
 
    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 */



More information about the gnucash-changes mailing list