mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
aeef9d36d0
commit
5b602c3a93
@ -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,
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user