8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

POSIX-only fix for #7582: Missing isc_info_end in Firebird.pas. Appropriate fix for windows build is needed.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
AlexPeshkoff 2023-05-17 19:10:30 +03:00
parent 5a57e1af23
commit 6707c7c2cc
3 changed files with 347 additions and 6 deletions

View File

@ -122,6 +122,7 @@ PAS_ROOT=$(MISC)/pascal
PASCAL_SOURCES=$(wildcard $(PAS_ROOT)/*)
TMP_FUNCS_PAS=$(TMP_ROOT)/func.pas
XPB_CONSTS=$(SRC_ROOT)/include/firebird/impl/consts_pub.h
INF_CONSTS=$(SRC_ROOT)/include/firebird/impl/inf_pub.h
ERR_CONSTS_PAS=$(SRC_ROOT)/misc/pascal/gds_codes.pas
RPL_AWK=$(GEN_ROOT)/def_awk
RPL_AWK_SRC=$(MISC)/def_awk.c
@ -154,9 +155,10 @@ $(TMP_ROOT)/iberror.pas: $(BUILD_FILE) $(ERR_CONSTS_PAS) $(SRC_ROOT)/include/fir
cp $(ERR_CONSTS_PAS) $(TMP_ROOT)/iberror.pas
cat $(TMP_ROOT)/iberror_codes.pas >> $(TMP_ROOT)/iberror.pas
$(TMP_FUNCS_PAS): $(PASCAL_SOURCES) $(XPB_CONSTS) $(TMP_ROOT)/iberror.pas $(RPL_AWK) $(RPL_GREP)
$(TMP_FUNCS_PAS): $(PASCAL_SOURCES) $(XPB_CONSTS) $(INF_CONSTS) $(TMP_ROOT)/iberror.pas $(RPL_AWK) $(RPL_GREP)
cp $(PAS_ROOT)/fb_get_master_interface.pas $(TMP_FUNCS_PAS)
$(RPL_AWK) <$(XPB_CONSTS) >>$(TMP_FUNCS_PAS)
$(RPL_AWK) <$(INF_CONSTS) >>$(TMP_FUNCS_PAS)
$(RPL_GREP) <$(TMP_ROOT)/iberror.pas >>$(TMP_FUNCS_PAS)
$(API_PAS_FILE): $(IDL_FILE) $(PASCAL_SOURCES) $(TMP_FUNCS_PAS)

View File

@ -4334,6 +4334,340 @@ const
fb_dbg_map_for_curname = byte(8);
fb_dbg_arg_input = byte(0);
fb_dbg_arg_output = byte(1);
isc_info_end = byte(1);
isc_info_truncated = byte(2);
isc_info_error = byte(3);
isc_info_data_not_ready = byte(4);
isc_info_length = byte(126);
isc_info_flag_end = byte(127);
isc_info_db_id = byte(4);
isc_info_reads = byte(5);
isc_info_writes = byte(6);
isc_info_fetches = byte(7);
isc_info_marks = byte(8);
isc_info_implementation = byte(11);
isc_info_isc_version = byte(12);
isc_info_base_level = byte(13);
isc_info_page_size = byte(14);
isc_info_num_buffers = byte(15);
isc_info_limbo = byte(16);
isc_info_current_memory = byte(17);
isc_info_max_memory = byte(18);
isc_info_window_turns = byte(19);
isc_info_license = byte(20);
isc_info_allocation = byte(21);
isc_info_attachment_id = byte(22);
isc_info_read_seq_count = byte(23);
isc_info_read_idx_count = byte(24);
isc_info_insert_count = byte(25);
isc_info_update_count = byte(26);
isc_info_delete_count = byte(27);
isc_info_backout_count = byte(28);
isc_info_purge_count = byte(29);
isc_info_expunge_count = byte(30);
isc_info_sweep_interval = byte(31);
isc_info_ods_version = byte(32);
isc_info_ods_minor_version = byte(33);
isc_info_no_reserve = byte(34);
isc_info_logfile = byte(35);
isc_info_cur_logfile_name = byte(36);
isc_info_cur_log_part_offset = byte(37);
isc_info_num_wal_buffers = byte(38);
isc_info_wal_buffer_size = byte(39);
isc_info_wal_ckpt_length = byte(40);
isc_info_wal_cur_ckpt_interval = byte(41);
isc_info_wal_prv_ckpt_fname = byte(42);
isc_info_wal_prv_ckpt_poffset = byte(43);
isc_info_wal_recv_ckpt_fname = byte(44);
isc_info_wal_recv_ckpt_poffset = byte(45);
isc_info_wal_grpc_wait_usecs = byte(47);
isc_info_wal_num_io = byte(48);
isc_info_wal_avg_io_size = byte(49);
isc_info_wal_num_commits = byte(50);
isc_info_wal_avg_grpc_size = byte(51);
isc_info_forced_writes = byte(52);
isc_info_user_names = byte(53);
isc_info_page_errors = byte(54);
isc_info_record_errors = byte(55);
isc_info_bpage_errors = byte(56);
isc_info_dpage_errors = byte(57);
isc_info_ipage_errors = byte(58);
isc_info_ppage_errors = byte(59);
isc_info_tpage_errors = byte(60);
isc_info_set_page_buffers = byte(61);
isc_info_db_sql_dialect = byte(62);
isc_info_db_read_only = byte(63);
isc_info_db_size_in_pages = byte(64);
frb_info_att_charset = byte(101);
isc_info_db_class = byte(102);
isc_info_firebird_version = byte(103);
isc_info_oldest_transaction = byte(104);
isc_info_oldest_active = byte(105);
isc_info_oldest_snapshot = byte(106);
isc_info_next_transaction = byte(107);
isc_info_db_provider = byte(108);
isc_info_active_transactions = byte(109);
isc_info_active_tran_count = byte(110);
isc_info_creation_date = byte(111);
isc_info_db_file_size = byte(112);
fb_info_page_contents = byte(113);
fb_info_implementation = byte(114);
fb_info_page_warns = byte(115);
fb_info_record_warns = byte(116);
fb_info_bpage_warns = byte(117);
fb_info_dpage_warns = byte(118);
fb_info_ipage_warns = byte(119);
fb_info_ppage_warns = byte(120);
fb_info_tpage_warns = byte(121);
fb_info_pip_errors = byte(122);
fb_info_pip_warns = byte(123);
fb_info_pages_used = byte(124);
fb_info_pages_free = byte(125);
fb_info_ses_idle_timeout_db = byte(129);
fb_info_ses_idle_timeout_att = byte(130);
fb_info_ses_idle_timeout_run = byte(131);
fb_info_conn_flags = byte(132);
fb_info_crypt_key = byte(133);
fb_info_crypt_state = byte(134);
fb_info_statement_timeout_db = byte(135);
fb_info_statement_timeout_att = byte(136);
fb_info_protocol_version = byte(137);
fb_info_crypt_plugin = byte(138);
fb_info_creation_timestamp_tz = byte(139);
fb_info_wire_crypt = byte(140);
fb_info_features = byte(141);
fb_info_next_attachment = byte(142);
fb_info_next_statement = byte(143);
fb_info_db_guid = byte(144);
fb_info_db_file_id = byte(145);
fb_info_replica_mode = byte(146);
fb_info_username = byte(147);
fb_info_sqlrole = byte(148);
fb_info_parallel_workers = byte(149);
fb_info_crypt_encrypted = $01;
fb_info_crypt_process = $02;
fb_feature_multi_statements = byte(1);
fb_feature_multi_transactions = byte(2);
fb_feature_named_parameters = byte(3);
fb_feature_session_reset = byte(4);
fb_feature_read_consistency = byte(5);
fb_feature_statement_timeout = byte(6);
fb_feature_statement_long_life = byte(7);
fb_info_replica_none = byte(0);
fb_info_replica_read_only = byte(1);
fb_info_replica_read_write = byte(2);
isc_info_db_impl_rdb_vms = byte(1);
isc_info_db_impl_rdb_eln = byte(2);
isc_info_db_impl_rdb_eln_dev = byte(3);
isc_info_db_impl_rdb_vms_y = byte(4);
isc_info_db_impl_rdb_eln_y = byte(5);
isc_info_db_impl_jri = byte(6);
isc_info_db_impl_jsv = byte(7);
isc_info_db_impl_isc_apl_68K = byte(25);
isc_info_db_impl_isc_vax_ultr = byte(26);
isc_info_db_impl_isc_vms = byte(27);
isc_info_db_impl_isc_sun_68k = byte(28);
isc_info_db_impl_isc_os2 = byte(29);
isc_info_db_impl_isc_sun4 = byte(30);
isc_info_db_impl_isc_hp_ux = byte(31);
isc_info_db_impl_isc_sun_386i = byte(32);
isc_info_db_impl_isc_vms_orcl = byte(33);
isc_info_db_impl_isc_mac_aux = byte(34);
isc_info_db_impl_isc_rt_aix = byte(35);
isc_info_db_impl_isc_mips_ult = byte(36);
isc_info_db_impl_isc_xenix = byte(37);
isc_info_db_impl_isc_dg = byte(38);
isc_info_db_impl_isc_hp_mpexl = byte(39);
isc_info_db_impl_isc_hp_ux68K = byte(40);
isc_info_db_impl_isc_sgi = byte(41);
isc_info_db_impl_isc_sco_unix = byte(42);
isc_info_db_impl_isc_cray = byte(43);
isc_info_db_impl_isc_imp = byte(44);
isc_info_db_impl_isc_delta = byte(45);
isc_info_db_impl_isc_next = byte(46);
isc_info_db_impl_isc_dos = byte(47);
isc_info_db_impl_m88K = byte(48);
isc_info_db_impl_unixware = byte(49);
isc_info_db_impl_isc_winnt_x86 = byte(50);
isc_info_db_impl_isc_epson = byte(51);
isc_info_db_impl_alpha_osf = byte(52);
isc_info_db_impl_alpha_vms = byte(53);
isc_info_db_impl_netware_386 = byte(54);
isc_info_db_impl_win_only = byte(55);
isc_info_db_impl_ncr_3000 = byte(56);
isc_info_db_impl_winnt_ppc = byte(57);
isc_info_db_impl_dg_x86 = byte(58);
isc_info_db_impl_sco_ev = byte(59);
isc_info_db_impl_i386 = byte(60);
isc_info_db_impl_freebsd = byte(61);
isc_info_db_impl_netbsd = byte(62);
isc_info_db_impl_darwin_ppc = byte(63);
isc_info_db_impl_sinixz = byte(64);
isc_info_db_impl_linux_sparc = byte(65);
isc_info_db_impl_linux_amd64 = byte(66);
isc_info_db_impl_freebsd_amd64 = byte(67);
isc_info_db_impl_winnt_amd64 = byte(68);
isc_info_db_impl_linux_ppc = byte(69);
isc_info_db_impl_darwin_x86 = byte(70);
isc_info_db_impl_linux_mipsel = byte(71);
isc_info_db_impl_linux_mips = byte(72);
isc_info_db_impl_darwin_x64 = byte(73);
isc_info_db_impl_sun_amd64 = byte(74);
isc_info_db_impl_linux_arm = byte(75);
isc_info_db_impl_linux_ia64 = byte(76);
isc_info_db_impl_darwin_ppc64 = byte(77);
isc_info_db_impl_linux_s390x = byte(78);
isc_info_db_impl_linux_s390 = byte(79);
isc_info_db_impl_linux_sh = byte(80);
isc_info_db_impl_linux_sheb = byte(81);
isc_info_db_impl_linux_hppa = byte(82);
isc_info_db_impl_linux_alpha = byte(83);
isc_info_db_impl_linux_arm64 = byte(84);
isc_info_db_impl_linux_ppc64el = byte(85);
isc_info_db_impl_linux_ppc64 = byte(86);
isc_info_db_impl_linux_m68k = byte(87);
isc_info_db_impl_linux_riscv64 = byte(88);
isc_info_db_impl_freebsd_ppc64el = byte(89);
isc_info_db_impl_linux_mips64el = byte(90);
isc_info_db_impl_freebsd_ppc64 = byte(91);
isc_info_db_impl_freebsd_ppc = byte(92);
isc_info_db_class_access = byte(1);
isc_info_db_class_y_valve = byte(2);
isc_info_db_class_rem_int = byte(3);
isc_info_db_class_rem_srvr = byte(4);
isc_info_db_class_pipe_int = byte(7);
isc_info_db_class_pipe_srvr = byte(8);
isc_info_db_class_sam_int = byte(9);
isc_info_db_class_sam_srvr = byte(10);
isc_info_db_class_gateway = byte(11);
isc_info_db_class_cache = byte(12);
isc_info_db_class_classic_access = byte(13);
isc_info_db_class_server_access = byte(14);
isc_info_db_code_rdb_eln = byte(1);
isc_info_db_code_rdb_vms = byte(2);
isc_info_db_code_interbase = byte(3);
isc_info_db_code_firebird = byte(4);
isc_info_number_messages = byte(4);
isc_info_max_message = byte(5);
isc_info_max_send = byte(6);
isc_info_max_receive = byte(7);
isc_info_state = byte(8);
isc_info_message_number = byte(9);
isc_info_message_size = byte(10);
isc_info_request_cost = byte(11);
isc_info_access_path = byte(12);
isc_info_req_select_count = byte(13);
isc_info_req_insert_count = byte(14);
isc_info_req_update_count = byte(15);
isc_info_req_delete_count = byte(16);
isc_info_rsb_end = byte(0);
isc_info_rsb_begin = byte(1);
isc_info_rsb_type = byte(2);
isc_info_rsb_relation = byte(3);
isc_info_rsb_plan = byte(4);
isc_info_rsb_unknown = byte(1);
isc_info_rsb_indexed = byte(2);
isc_info_rsb_navigate = byte(3);
isc_info_rsb_sequential = byte(4);
isc_info_rsb_cross = byte(5);
isc_info_rsb_sort = byte(6);
isc_info_rsb_first = byte(7);
isc_info_rsb_boolean = byte(8);
isc_info_rsb_union = byte(9);
isc_info_rsb_aggregate = byte(10);
isc_info_rsb_merge = byte(11);
isc_info_rsb_ext_sequential = byte(12);
isc_info_rsb_ext_indexed = byte(13);
isc_info_rsb_ext_dbkey = byte(14);
isc_info_rsb_left_cross = byte(15);
isc_info_rsb_select = byte(16);
isc_info_rsb_sql_join = byte(17);
isc_info_rsb_simulate = byte(18);
isc_info_rsb_sim_cross = byte(19);
isc_info_rsb_once = byte(20);
isc_info_rsb_procedure = byte(21);
isc_info_rsb_skip = byte(22);
isc_info_rsb_virt_sequential = byte(23);
isc_info_rsb_recursive = byte(24);
isc_info_rsb_window = byte(25);
isc_info_rsb_singular = byte(26);
isc_info_rsb_writelock = byte(27);
isc_info_rsb_buffer = byte(28);
isc_info_rsb_hash = byte(29);
isc_info_rsb_and = byte(1);
isc_info_rsb_or = byte(2);
isc_info_rsb_dbkey = byte(3);
isc_info_rsb_index = byte(4);
isc_info_req_active = byte(2);
isc_info_req_inactive = byte(3);
isc_info_req_send = byte(4);
isc_info_req_receive = byte(5);
isc_info_req_select = byte(6);
isc_info_req_sql_stall = byte(7);
isc_info_blob_num_segments = byte(4);
isc_info_blob_max_segment = byte(5);
isc_info_blob_total_length = byte(6);
isc_info_blob_type = byte(7);
isc_info_tra_id = byte(4);
isc_info_tra_oldest_interesting = byte(5);
isc_info_tra_oldest_snapshot = byte(6);
isc_info_tra_oldest_active = byte(7);
isc_info_tra_isolation = byte(8);
isc_info_tra_access = byte(9);
isc_info_tra_lock_timeout = byte(10);
fb_info_tra_dbpath = byte(11);
fb_info_tra_snapshot_number = byte(12);
isc_info_tra_consistency = byte(1);
isc_info_tra_concurrency = byte(2);
isc_info_tra_read_committed = byte(3);
isc_info_tra_no_rec_version = byte(0);
isc_info_tra_rec_version = byte(1);
isc_info_tra_read_consistency = byte(2);
isc_info_tra_readonly = byte(0);
isc_info_tra_readwrite = byte(1);
isc_info_sql_select = byte(4);
isc_info_sql_bind = byte(5);
isc_info_sql_num_variables = byte(6);
isc_info_sql_describe_vars = byte(7);
isc_info_sql_describe_end = byte(8);
isc_info_sql_sqlda_seq = byte(9);
isc_info_sql_message_seq = byte(10);
isc_info_sql_type = byte(11);
isc_info_sql_sub_type = byte(12);
isc_info_sql_scale = byte(13);
isc_info_sql_length = byte(14);
isc_info_sql_null_ind = byte(15);
isc_info_sql_field = byte(16);
isc_info_sql_relation = byte(17);
isc_info_sql_owner = byte(18);
isc_info_sql_alias = byte(19);
isc_info_sql_sqlda_start = byte(20);
isc_info_sql_stmt_type = byte(21);
isc_info_sql_get_plan = byte(22);
isc_info_sql_records = byte(23);
isc_info_sql_batch_fetch = byte(24);
isc_info_sql_relation_alias = byte(25);
isc_info_sql_explain_plan = byte(26);
isc_info_sql_stmt_flags = byte(27);
isc_info_sql_stmt_timeout_user = byte(28);
isc_info_sql_stmt_timeout_run = byte(29);
isc_info_sql_stmt_blob_align = byte(30);
isc_info_sql_exec_path_blr_bytes = byte(31);
isc_info_sql_exec_path_blr_text = byte(32);
isc_info_sql_stmt_select = byte(1);
isc_info_sql_stmt_insert = byte(2);
isc_info_sql_stmt_update = byte(3);
isc_info_sql_stmt_delete = byte(4);
isc_info_sql_stmt_ddl = byte(5);
isc_info_sql_stmt_get_segment = byte(6);
isc_info_sql_stmt_put_segment = byte(7);
isc_info_sql_stmt_exec_procedure = byte(8);
isc_info_sql_stmt_start_trans = byte(9);
isc_info_sql_stmt_commit = byte(10);
isc_info_sql_stmt_rollback = byte(11);
isc_info_sql_stmt_select_for_upd = byte(12);
isc_info_sql_stmt_set_generator = byte(13);
isc_info_sql_stmt_savepoint = byte(14);
isc_facility = 20;
isc_err_base = 335544320;
isc_err_factor = 1;

View File

@ -18,7 +18,7 @@ int main()
toks[2] = NULL;
for (n = 0; n < 3; ++n)
{
toks[n] = strtok(p, " \t\n\r");
toks[n] = strtok(p, " \t\n\r,");
p = NULL;
if (!toks[n])
break;
@ -29,7 +29,12 @@ int main()
continue;
/* skip unknown statements */
if (strcmp(toks[0], "#define") != 0)
char* name = NULL;
if (strcmp(toks[0], "#define") == 0) // #define isc_info_end 1
name = toks[1];
else if (strcmp(toks[1], "=") == 0) // isc_info_db_id = 4
name = toks[0];
if (! name)
continue;
/* skip unknown constants */
@ -43,11 +48,11 @@ int main()
/* output correct constant */
if (*toks[2] == '-')
printf("\t%s = %s;\n", toks[1], toks[2]);
printf("\t%s = %s;\n", name, toks[2]);
else if (strncmp(toks[2], "0x", 2) == 0)
printf("\t%s = $%s;\n", toks[1], toks[2] + 2);
printf("\t%s = $%s;\n", name, toks[2] + 2);
else
printf("\t%s = byte(%s);\n", toks[1], toks[2]);
printf("\t%s = byte(%s);\n", name, toks[2]);
}
return 0;