r22213 - gnucash/trunk/src/libqof/qof/test - Fix windows/mingw build failure due to different struct tm length.
Christian Stimming
cstim at code.gnucash.org
Sun Jun 10 15:59:19 EDT 2012
Author: cstim
Date: 2012-06-10 15:59:19 -0400 (Sun, 10 Jun 2012)
New Revision: 22213
Trac: http://svn.gnucash.org/trac/changeset/22213
Modified:
gnucash/trunk/src/libqof/qof/test/Makefile.am
gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
Log:
Fix windows/mingw build failure due to different struct tm length.
Modified: gnucash/trunk/src/libqof/qof/test/Makefile.am
===================================================================
--- gnucash/trunk/src/libqof/qof/test/Makefile.am 2012-06-10 19:32:13 UTC (rev 22212)
+++ gnucash/trunk/src/libqof/qof/test/Makefile.am 2012-06-10 19:59:19 UTC (rev 22213)
@@ -43,4 +43,5 @@
-I$(top_srcdir)/${MODULEPATH} \
-I$(top_srcdir)/src/test-core \
-DTESTPROG=test_qof \
+ -I$(top_srcdir)/lib/libc \
${GLIB_CFLAGS}
Modified: gnucash/trunk/src/libqof/qof/test/test-gnc-date.c
===================================================================
--- gnucash/trunk/src/libqof/qof/test/test-gnc-date.c 2012-06-10 19:32:13 UTC (rev 22212)
+++ gnucash/trunk/src/libqof/qof/test/test-gnc-date.c 2012-06-10 19:59:19 UTC (rev 22213)
@@ -31,6 +31,9 @@
#include "../gnc-date-p.h"
#include <locale.h>
#include <glib/gprintf.h>
+#ifndef HAVE_STRPTIME
+# include "strptime.h"
+#endif
static const gchar *suitename = "/qof/gnc-date";
void test_suite_gnc_date ( void );
@@ -473,7 +476,11 @@
{
gchar buff[MAX_DATE_LENGTH], t_buff[MAX_DATE_LENGTH];
gchar *locale = g_strdup (setlocale (LC_TIME, NULL));
- struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0
+#ifndef G_OS_WIN32
+ , 0, 0
+#endif
+ };
qof_date_format_set (QOF_DATE_FORMAT_UK);
memset ((gpointer)buff, 0, sizeof (buff));
@@ -1105,7 +1112,11 @@
GDateTime *gdt = g_date_time_new_now_local ();
gint year = g_date_time_get_year (gdt);
gint month = g_date_time_get_month (gdt);
- struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ struct tm tm = { 0, 0, 0, 0, 0, 0, 0, 0, 0
+#ifndef G_OS_WIN32
+ , 0, 0
+#endif
+ };
gchar buff[MAX_DATE_LENGTH];
g_date_time_unref (gdt);
More information about the gnucash-changes
mailing list