mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 12:43:03 +01:00
Reworked Alex's solution for modern compilers (GCC 5/6)
This commit is contained in:
parent
c2de91fa38
commit
60ed79f6b0
@ -2820,63 +2820,62 @@ static void gen_request(const gpre_req* request)
|
||||
printa(0, "static %sshort\n isc_%dl = %d;",
|
||||
(request->req_flags & REQ_extend_dpb) ? "" : CONST_STR,
|
||||
request->req_ident, request->req_length);
|
||||
printa(0, "static %sunsigned char\n isc_%d [] = {", CONST_STR, request->req_ident);
|
||||
|
||||
const TEXT* string_type = "blr";
|
||||
if (gpreGlob.sw_raw)
|
||||
{
|
||||
gen_raw(request->req_blr, request->req_length);
|
||||
bool is_blr = true;
|
||||
|
||||
switch (request->req_type)
|
||||
{
|
||||
switch (request->req_type)
|
||||
{
|
||||
case REQ_create_database:
|
||||
case REQ_ready:
|
||||
string_type = "dpb";
|
||||
is_blr = false;
|
||||
break;
|
||||
|
||||
case REQ_ddl:
|
||||
string_type = "dyn";
|
||||
break;
|
||||
case REQ_slice:
|
||||
string_type = "sdl";
|
||||
is_blr = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
string_type = "blr";
|
||||
}
|
||||
case REQ_slice:
|
||||
string_type = "sdl";
|
||||
is_blr = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_blr)
|
||||
printa(0, "static %sunsigned char\n isc_%d [] = {", CONST_STR, request->req_ident);
|
||||
else
|
||||
printa(0, "static %schar\n isc_%d [] = {", CONST_STR, request->req_ident);
|
||||
|
||||
if (gpreGlob.sw_raw)
|
||||
{
|
||||
gen_raw(request->req_blr, request->req_length);
|
||||
}
|
||||
else
|
||||
switch (request->req_type)
|
||||
{
|
||||
case REQ_create_database:
|
||||
case REQ_ready:
|
||||
string_type = "dpb";
|
||||
if (PRETTY_print_cdb(request->req_blr, gen_blr, 0, 0))
|
||||
{
|
||||
CPR_error("internal error during parameter generation");
|
||||
}
|
||||
break;
|
||||
|
||||
case REQ_ddl:
|
||||
string_type = "dyn";
|
||||
if (PRETTY_print_dyn(request->req_blr, gen_blr, 0, 0))
|
||||
{
|
||||
CPR_error("internal error during dynamic DDL generation");
|
||||
}
|
||||
break;
|
||||
|
||||
case REQ_slice:
|
||||
string_type = "sdl";
|
||||
if (PRETTY_print_sdl(request->req_blr, gen_blr, 0, 0))
|
||||
{
|
||||
CPR_error("internal error during SDL generation");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
string_type = "blr";
|
||||
if (fb_print_blr(request->req_blr, request->req_length, gen_blr, 0, 0))
|
||||
CPR_error("internal error during BLR generation");
|
||||
}
|
||||
|
||||
printa(INDENT, "};\t/* end of %s string for request isc_%d */\n",
|
||||
string_type, request->req_ident);
|
||||
}
|
||||
@ -3827,7 +3826,7 @@ static void make_ready(const gpre_dbb* db,
|
||||
|
||||
// generate the attach database itself
|
||||
|
||||
const TEXT* dpb_size_ptr = "0";
|
||||
const TEXT* dpb_size_ptr = "(short) 0";
|
||||
const TEXT* dpb_ptr = "(char*) 0";
|
||||
|
||||
align(column);
|
||||
|
Loading…
Reference in New Issue
Block a user