From 00e1a2f0886e471d594c22dc14fc9d80ce5098c4 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Apr 2012 00:01:31 +0000 Subject: Thu Apr 26 00:01:31 UTC 2012 --- .../gambas2/db.firebird.gcc-4.6.0-fix.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch (limited to 'community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch') diff --git a/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch new file mode 100644 index 000000000..0b6e68df3 --- /dev/null +++ b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch @@ -0,0 +1,35 @@ +--- gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:01:54 3864 ++++ gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:26:41 3865 +@@ -1216,7 +1216,8 @@ + GB.StoreVariant(&fantom, &buffer[i]); + } + else{ +- GB.StoreVariant(&res->GetData(pos,i), &buffer[i]); ++ GB_VARIANT val = res->GetData(pos,i); ++ GB.StoreVariant(&val , &buffer[i]); + } + } + } +@@ -1874,6 +1875,8 @@ + static char query[SQLMAXLEN]; + int type; + std::string str1,str2; ++ GB_VARIANT varval; ++ char* charval; + snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field); + if (do_query(db, query, &res, "Unable to get the field from the table")){ + delete res; +@@ -1900,9 +1903,11 @@ + str1=res->GetData(0,3).value.value._string; + if(str1!="") + str2=str1.assign(str1,8,str1.length()-8); +- GB.FreeString(&res->GetData(0,3).value.value._string); ++ charval = res->GetData(0,3).value.value._string; ++ GB.FreeString(&charval); + res->SetData(0,3,str2); +- GB.StoreVariant(&res->GetData(0,3), &info->def); ++ varval = res->GetData(0,3); ++ GB.StoreVariant(&varval, &info->def); + } + delete res; + return FALSE; -- cgit v1.2.3-54-g00ecf