mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix windows/mingw build failure due to different struct tm length.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22213 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
bf6e5ba95f
commit
36654ff81a
@ -43,4 +43,5 @@ test_qof_CFLAGS = \
|
|||||||
-I$(top_srcdir)/${MODULEPATH} \
|
-I$(top_srcdir)/${MODULEPATH} \
|
||||||
-I$(top_srcdir)/src/test-core \
|
-I$(top_srcdir)/src/test-core \
|
||||||
-DTESTPROG=test_qof \
|
-DTESTPROG=test_qof \
|
||||||
|
-I$(top_srcdir)/lib/libc \
|
||||||
${GLIB_CFLAGS}
|
${GLIB_CFLAGS}
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
#include "../gnc-date-p.h"
|
#include "../gnc-date-p.h"
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <glib/gprintf.h>
|
#include <glib/gprintf.h>
|
||||||
|
#ifndef HAVE_STRPTIME
|
||||||
|
# include "strptime.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static const gchar *suitename = "/qof/gnc-date";
|
static const gchar *suitename = "/qof/gnc-date";
|
||||||
void test_suite_gnc_date ( void );
|
void test_suite_gnc_date ( void );
|
||||||
@ -473,7 +476,11 @@ test_qof_print_date_dmy_buff (void)
|
|||||||
{
|
{
|
||||||
gchar buff[MAX_DATE_LENGTH], t_buff[MAX_DATE_LENGTH];
|
gchar buff[MAX_DATE_LENGTH], t_buff[MAX_DATE_LENGTH];
|
||||||
gchar *locale = g_strdup (setlocale (LC_TIME, NULL));
|
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);
|
qof_date_format_set (QOF_DATE_FORMAT_UK);
|
||||||
memset ((gpointer)buff, 0, sizeof (buff));
|
memset ((gpointer)buff, 0, sizeof (buff));
|
||||||
@ -1105,7 +1112,11 @@ test_qof_scan_date (void)
|
|||||||
GDateTime *gdt = g_date_time_new_now_local ();
|
GDateTime *gdt = g_date_time_new_now_local ();
|
||||||
gint year = g_date_time_get_year (gdt);
|
gint year = g_date_time_get_year (gdt);
|
||||||
gint month = g_date_time_get_month (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];
|
gchar buff[MAX_DATE_LENGTH];
|
||||||
g_date_time_unref (gdt);
|
g_date_time_unref (gdt);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user