Fix double definition of DEBUG_MEMORY

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22186 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2012-05-21 15:32:52 +00:00
parent aeef9d36d0
commit 5b602c3a93
2 changed files with 18 additions and 7 deletions

View File

@ -584,7 +584,8 @@ AC_ARG_ENABLE( debug,
CFLAGS="${CFLAGS} -g ${USER_OPTIMIZATION}"
LDFLAGS="${LDFLAGS} -g"
AC_DEFINE(DEBUG_MEMORY,1,[Enable debug memory])
AC_DEFINE(DEBUG_MEMORY,0,[Enable debug memory])
],
[ AC_DEFINE(DEBUG_MEMORY,0,[Enable debug memory])
])
AC_ARG_ENABLE( profile,

View File

@ -2008,16 +2008,26 @@ row_get_value_at_col_name( GncSqlRow* row, const gchar* col_name )
{
return NULL;
}
else
{
time = dbi_result_get_datetime( dbi_row->result, col_name );
time = dbi_result_get_datetime( dbi_row->result, col_name );
/* Protect gmtime from time values < 0 to work around a mingw
bug that fills struct_tm with garbage values which in turn
creates a string that GDate can't parse. */
if (time >= 0)
{
(void)gmtime_r( &time, &tm_struct );
(void)g_value_init( value, G_TYPE_STRING );
g_value_take_string( value,
g_strdup_printf( "%d%02d%02d%02d%02d%02d",
1900 + tm_struct.tm_year, tm_struct.tm_mon + 1, tm_struct.tm_mday,
tm_struct.tm_hour, tm_struct.tm_min, tm_struct.tm_sec ) );
}
1900 + tm_struct.tm_year,
tm_struct.tm_mon + 1,
tm_struct.tm_mday,
tm_struct.tm_hour,
tm_struct.tm_min,
tm_struct.tm_sec ) );
}
else
g_value_take_string (value, "19691231235959");
break;
default:
PERR( "Field %s: unknown DBI_TYPE: %d\n", col_name, type );