libfossil
config.h File Reference
#include "autoconfig.h"
#include <stdint.h>
#include <inttypes.h>
Include dependency graph for config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __STDC_FORMAT_MACROS
#define _C99_SOURCE
#define _ISOC99_SOURCE
#define fsl__unused
#define FSL_API_ARMOR   1
 FSL_API_ARMOR is a not-yet-widely-implemented feature adopted from SQLite, in which many APIs will perform more argument validation against NULL pointers or values which might, if unchecked, lead to illegal memory access.
#define FSL_BLOB_MAX_SIZE   0x7fff0000
 fossil(1)'s internal buffer size upper limit, which is also its blob.content size limit.
#define FSL_CONFIG_ENABLE_TIMER   1
 If true, the fsl_timer_xxx() family of functions might do something useful, otherwise they do not.
#define FSL_ENABLE_SQLITE_REGEXP   0
#define FSL_EXPORT   extern
#define FSL_ID_T_PFMT   PRIi32
 Fossil's fsl_id_t equivalent of C99's PRIi32 and friends.
#define FSL_ID_T_SFMT   SCNi32
 Fossil's fsl_id_t equivalent of C99's SCNi32 and friends.
#define FSL_INT_T_PFMT   PRIi64
 Fossil's fsl_int_t equivalent of C99's PRIi32 and friends.
#define FSL_INT_T_SFMT   SCNi64
 Fossil's fsl_int_t equivalent of C99's SCNi32 and friends.
#define FSL_JULIAN_T_PFMT   ".17g"
 An output format specifier for Julian-format doubles.
#define FSL_PLATFORM_IS_UNIX   1
#define FSL_PLATFORM_IS_WINDOWS   0
#define FSL_PLATFORM_PLATFORM   "unix"
#define FSL_SHA1_HARDENED   1
 If true, the library uses the "hardnened" SHA1 algorithm rather than the original.
#define FSL_SIZE_T_PFMT   FSL_UINT_T_PFMT
 Fossil's fsl_size_t equivalent of C99's PRIu32 and friends.
#define FSL_SIZE_T_SFMT   FSL_UINT_T_SFMT
 Fossil's fsl_int_t equivalent of C99's SCNu32 and friends.
#define FSL_SWITCH_FALL_THROUGH
#define FSL_TIME_T_PFMT   PRIi64
 Fossil's fsl_time_t equivalent of C99's PRIi32 and friends.
#define FSL_TIME_T_SFMT   SCNi64
 Fossil's fsl_time_t equivalent of C99's SCNi32 and friends.
#define FSL_UINT_T_PFMT   PRIu64
 Fossil's fsl_uint_t equivalent of C99's PRIu32 and friends.
#define FSL_UINT_T_SFMT   SCNu64
 Fossil's fsl_uint_t equivalent of C99's SCNu32 and friends.
#define HAVE_SIGACTION   1

Typedefs

typedef uint16_t fsl_flag16_t
typedef uint32_t fsl_flag32_t
 A 32-bit unsigned int type.
typedef int32_t fsl_id_t
 fsl_id_t is a signed integer type used to store database record IDs.
typedef int64_t fsl_int_t
 fsl_int_t is a signed integer type used to denote "relative" ranges and lengths, or to tell a routine that it should try to figure out the length of some byte array itself (e.g.
typedef uint64_t fsl_size_t
 fsl_size_t is an unsigned integer type used to denote absolute ranges and lengths.
typedef int64_t fsl_time_t
 The type used to represent type values.
typedef uint64_t fsl_uint_t
 The unsigned counterpart of fsl_int_t.

Macro Definition Documentation

◆ __STDC_FORMAT_MACROS

#define __STDC_FORMAT_MACROS

Definition at line 72 of file config.h.

◆ _C99_SOURCE

#define _C99_SOURCE

Definition at line 24 of file config.h.

◆ _ISOC99_SOURCE

#define _ISOC99_SOURCE

Definition at line 19 of file config.h.

◆ fsl__unused

#define fsl__unused

Definition at line 353 of file config.h.

◆ FSL_API_ARMOR

#define FSL_API_ARMOR   1

FSL_API_ARMOR is a not-yet-widely-implemented feature adopted from SQLite, in which many APIs will perform more argument validation against NULL pointers or values which might, if unchecked, lead to illegal memory access.

Without this flag, such APIs have undefined behavior with such illegal arguments but use fewer CPU cycles.

Definition at line 53 of file config.h.

◆ FSL_BLOB_MAX_SIZE

#define FSL_BLOB_MAX_SIZE   0x7fff0000

fossil(1)'s internal buffer size upper limit, which is also its blob.content size limit.

Changing this has no magic ability to push past this limit, as pushing past them would create content incompatible with fossil(1), and going past just shy of 2gb would exceed sqlite3's limits.

Definition at line 327 of file config.h.

◆ FSL_CONFIG_ENABLE_TIMER

#define FSL_CONFIG_ENABLE_TIMER   1

If true, the fsl_timer_xxx() family of functions might do something useful, otherwise they do not.

Definition at line 314 of file config.h.

◆ FSL_ENABLE_SQLITE_REGEXP

#define FSL_ENABLE_SQLITE_REGEXP   0

Definition at line 317 of file config.h.

◆ FSL_EXPORT

#define FSL_EXPORT   extern

Definition at line 66 of file config.h.

Referenced by fcli_args_to_vfile_ids(), fcli_ckout_show_info(), fcli_cliflag_help(), fcli_cmd_aliascmp(), fcli_command_help(), fcli_cx(), fcli_db_ckout(), fcli_db_repo(), fcli_diff_colors(), fcli_dispatch_commands(), fcli_dump_cache_metrics(), fcli_dump_stmt_cache(), fcli_end_of_main(), fcli_err_report2(), fcli_err_reset(), fcli_err_set(), fcli_error(), fcli_fax(), fcli_fingerprint_check(), fcli_flag(), fcli_flag2(), fcli_flag_or_arg(), fcli_fossil_binary(), fcli_has_unused_args(), fcli_has_unused_flags(), fcli_help_show_aliases(), fcli_is_verbose(), fcli_list_ambiguous_artifacts(), fcli_needs_ckout(), fcli_needs_repo(), fcli_next_arg(), fcli_pre_setup(), fcli_printf(), fcli_process_flags(), fcli_progname(), fcli_setup_v2(), fcli_sync(), fsl_annotate(), fsl_appendf(), fsl_appendfv(), fsl_appendn(), fsl_branch_create(), fsl_branch_main(), fsl_branch_of_rid(), fsl_break_into_dlines(), fsl_buffer_append(), fsl_buffer_append_hex(), fsl_buffer_append_tcl_literal(), fsl_buffer_appendch(), fsl_buffer_appendf(), fsl_buffer_appendfv(), fsl_buffer_chomp(), fsl_buffer_clear(), fsl_buffer_compare(), fsl_buffer_compare_file(), fsl_buffer_compare_O1(), fsl_buffer_compress(), fsl_buffer_compress2(), fsl_buffer_contains_merge_marker(), fsl_buffer_copy(), fsl_buffer_copy_lines(), fsl_buffer_cstr(), fsl_buffer_cstr2(), fsl_buffer_defossilize(), fsl_buffer_delta_apply(), fsl_buffer_delta_apply2(), fsl_buffer_delta_create(), fsl_buffer_ensure_eol(), fsl_buffer_eq(), fsl_buffer_err(), fsl_buffer_err_clear(), fsl_buffer_esc_arg(), fsl_buffer_esc_arg_v2(), fsl_buffer_external(), fsl_buffer_fill_from(), fsl_buffer_fill_from_FILE(), fsl_buffer_fill_from_filename(), fsl_buffer_getdelim(), fsl_buffer_getline(), fsl_buffer_is_compressed(), fsl_buffer_materialize(), fsl_buffer_merge3(), fsl_buffer_reserve(), fsl_buffer_resize(), fsl_buffer_reuse(), fsl_buffer_rewind(), fsl_buffer_seek(), fsl_buffer_str(), fsl_buffer_stream_lines(), fsl_buffer_strftime(), fsl_buffer_strip_slashes(), fsl_buffer_swap(), fsl_buffer_swap_free(), fsl_buffer_take(), fsl_buffer_tell(), fsl_buffer_to_filename(), fsl_buffer_uncompress(), fsl_buffer_uncompressed_size(), fsl_bytes_defossilize(), fsl_bytes_fossilize(), fsl_canonical16(), fsl_card_F_ckout_mtime(), fsl_card_F_compare_name(), fsl_card_F_content(), fsl_card_F_list_finalize(), fsl_card_F_list_reserve(), fsl_card_is_legal(), fsl_card_J_free(), fsl_card_J_malloc(), fsl_card_Q_free(), fsl_card_Q_malloc(), fsl_card_T_clean(), fsl_card_T_free(), fsl_card_T_malloc(), fsl_chdir(), fsl_chdir2(), fsl_checkin_commit(), fsl_checkin_dequeue(), fsl_checkin_discard(), fsl_checkin_enqueue(), fsl_checkin_is_enqueued(), fsl_checkin_T_add(), fsl_checkin_T_add2(), fsl_cidiff(), fsl_ckout_calc_update_version(), fsl_ckout_changes_scan(), fsl_ckout_changes_visit(), fsl_ckout_clear_db(), fsl_ckout_db_search(), fsl_ckout_dbnames(), fsl_ckout_file_content(), fsl_ckout_filename_check(), fsl_ckout_fingerprint_check(), fsl_ckout_has_changes(), fsl_ckout_manage(), fsl_ckout_manifest_setting(), fsl_ckout_manifest_write(), fsl_ckout_merge(), fsl_ckout_open_dir(), fsl_ckout_rename(), fsl_ckout_rename_revert(), fsl_ckout_revert(), fsl_ckout_unmanage(), fsl_ckout_update(), fsl_ckout_version_info(), fsl_ckout_vfile_ids(), fsl_close_dbs(), fsl_compute_direct_ancestors(), fsl_config_close(), fsl_config_for_role(), fsl_config_get_bool(), fsl_config_get_buffer(), fsl_config_get_double(), fsl_config_get_id(), fsl_config_get_int32(), fsl_config_get_int64(), fsl_config_get_text(), fsl_config_global_preferred_name(), fsl_config_globs_load(), fsl_config_open(), fsl_config_set_blob(), fsl_config_set_bool(), fsl_config_set_double(), fsl_config_set_id(), fsl_config_set_int32(), fsl_config_set_int64(), fsl_config_set_text(), fsl_config_table_for_role(), fsl_config_transaction_begin(), fsl_config_transaction_end(), fsl_config_unset(), fsl_config_versionable_filename(), fsl_configs_get_bool(), fsl_configs_get_buffer(), fsl_configs_get_double(), fsl_configs_get_id(), fsl_configs_get_int32(), fsl_configs_get_int64(), fsl_configs_get_text(), fsl_content_get(), fsl_content_get_sym(), fsl_content_is_private(), fsl_content_make_public(), fsl_content_raw(), fsl_content_size(), fsl_content_size_v2(), fsl_count_nonbranch_children(), fsl_cx_allows_symlinks(), fsl_cx_case_sensitive_set(), fsl_cx_ckout_dir_name(), fsl_cx_confirm(), fsl_cx_confirmer_get(), fsl_cx_db(), fsl_cx_db_ckout(), fsl_cx_db_config(), fsl_cx_db_file_ckout(), fsl_cx_db_file_config(), fsl_cx_db_file_for_role(), fsl_cx_db_file_repo(), fsl_cx_db_repo(), fsl_cx_emit(), fsl_cx_err_e(), fsl_cx_err_ec(), fsl_cx_err_get(), fsl_cx_err_report(), fsl_cx_err_reset(), fsl_cx_err_set(), fsl_cx_err_set_e(), fsl_cx_err_setv(), fsl_cx_exec(), fsl_cx_exec_multi(), fsl_cx_exec_multiv(), fsl_cx_execv(), fsl_cx_filename_cmp(), fsl_cx_filename_collation(), fsl_cx_finalize(), fsl_cx_flag_set(), fsl_cx_flags_get(), fsl_cx_format(), fsl_cx_format_buffer(), fsl_cx_format_FILE(), fsl_cx_formatv(), fsl_cx_getcwd(), fsl_cx_glob_list(), fsl_cx_glob_matches(), fsl_cx_has_ckout(), fsl_cx_hash_filename(), fsl_cx_hash_policy_get(), fsl_cx_init(), fsl_cx_interrupted(), fsl_cx_interruptv(), fsl_cx_is_case_sensitive(), fsl_cx_last_insert_id(), fsl_cx_last_sync_url(), fsl_cx_listener_replace(), fsl_cx_malloc(), fsl_cx_prepare(), fsl_cx_prepare_cached(), fsl_cx_preparev(), fsl_cx_preparev_cached(), fsl_cx_schema_ticket(), fsl_cx_stat(), fsl_cx_stat2(), fsl_cx_txn_end_v2(), fsl_cx_txn_level(), fsl_cx_uplift_db_error(), fsl_cx_uplift_db_error2(), fsl_cx_user_get(), fsl_cx_user_guess(), fsl_cx_user_set(), fsl_data_is_compressed(), fsl_data_uncompressed_size(), fsl_db_attach(), fsl_db_changes_recent(), fsl_db_changes_total(), fsl_db_close(), fsl_db_detach(), fsl_db_each(), fsl_db_eachv(), fsl_db_err_get(), fsl_db_err_reset(), fsl_db_event_listener(), fsl_db_exec(), fsl_db_exec_multi(), fsl_db_exec_multiv(), fsl_db_execv(), fsl_db_exists(), fsl_db_existsv(), fsl_db_filename(), fsl_db_g_blob(), fsl_db_g_double(), fsl_db_g_id(), fsl_db_g_int32(), fsl_db_g_int64(), fsl_db_g_size(), fsl_db_g_text(), fsl_db_get_blob(), fsl_db_get_blobv(), fsl_db_get_buffer(), fsl_db_get_bufferv(), fsl_db_get_double(), fsl_db_get_doublev(), fsl_db_get_id(), fsl_db_get_idv(), fsl_db_get_int32(), fsl_db_get_int32v(), fsl_db_get_int64(), fsl_db_get_int64v(), fsl_db_get_size(), fsl_db_get_sizev(), fsl_db_get_text(), fsl_db_get_textv(), fsl_db_init(), fsl_db_is_writeable(), fsl_db_julian_now(), fsl_db_julian_to_iso8601(), fsl_db_last_insert_id(), fsl_db_malloc(), fsl_db_name(), fsl_db_open(), fsl_db_prepare(), fsl_db_prepare_cached(), fsl_db_preparev(), fsl_db_preparev_cached(), fsl_db_random_hex(), fsl_db_role_name(), fsl_db_select_slist(), fsl_db_select_slistv(), fsl_db_sqltrace_enable(), fsl_db_string_to_julian(), fsl_db_table_exists(), fsl_db_table_has_column(), fsl_db_txn_begin(), fsl_db_txn_commit(), fsl_db_txn_end_v2(), fsl_db_txn_level(), fsl_db_txn_rollback(), fsl_db_unix_to_iso8601(), fsl_deck_A_set(), fsl_deck_B_set(), fsl_deck_baseline_fetch(), fsl_deck_branch_set(), fsl_deck_C_set(), fsl_deck_clean(), fsl_deck_clean2(), fsl_deck_D_set(), fsl_deck_derive(), fsl_deck_E_set(), fsl_deck_F_add(), fsl_deck_F_foreach(), fsl_deck_F_next(), fsl_deck_F_rewind(), fsl_deck_F_search(), fsl_deck_F_set(), fsl_deck_F_set_content(), fsl_deck_finalize(), fsl_deck_foreach(), fsl_deck_G_set(), fsl_deck_H_set(), fsl_deck_has_required_cards(), fsl_deck_I_set(), fsl_deck_init(), fsl_deck_J_add(), fsl_deck_K_set(), fsl_deck_L_set(), fsl_deck_load_rid(), fsl_deck_load_sym(), fsl_deck_M_add(), fsl_deck_malloc(), fsl_deck_N_set(), fsl_deck_output(), fsl_deck_P_add(), fsl_deck_P_add_rid(), fsl_deck_P_get_id(), fsl_deck_parse(), fsl_deck_parse2(), fsl_deck_Q_add(), fsl_deck_R_calc(), fsl_deck_R_calc2(), fsl_deck_R_set(), fsl_deck_save(), fsl_deck_T_add(), fsl_deck_T_add2(), fsl_deck_to_json(), fsl_deck_U_set(), fsl_deck_unshuffle(), fsl_deck_W_set(), fsl_decode16(), fsl_delta_applied_size(), fsl_delta_apply(), fsl_delta_apply2(), fsl_delta_create(), fsl_delta_create2(), fsl_delta_r2s(), fsl_delta_s2r(), fsl_dibu_alloc(), fsl_dibu_factory(), fsl_dibu_finalizer(), fsl_diff_v2(), fsl_diff_v2_raw(), fsl_dir_check(), fsl_dir_is_empty(), fsl_dircrawl(), fsl_dline_change_spans(), fsl_dline_cmp(), fsl_dline_cmp_ignore_ws(), fsl_encode16(), fsl_errno_to_rc(), fsl_error_clear(), fsl_error_copy(), fsl_error_get(), fsl_error_propagate(), fsl_error_reset(), fsl_error_set(), fsl_error_setv(), fsl_fclose(), fsl_file_access(), fsl_file_canonical_name(), fsl_file_canonical_name2(), fsl_file_copy(), fsl_file_dirpart(), fsl_file_exec_set(), fsl_file_isexec(), fsl_file_mtime(), fsl_file_mtime_set(), fsl_file_rename(), fsl_file_simplify_name(), fsl_file_size(), fsl_file_tail(), fsl_file_tempname(), fsl_file_unlink(), fsl_filename_preferred_case(), fsl_filename_to_utf8(), fsl_filename_to_vfile_id(), fsl_filename_to_vfile_ids(), fsl_finalizer_f_buffer(), fsl_finalizer_f_FILE(), fsl_find_home_dir(), fsl_flush(), fsl_flush_f_FILE(), fsl_fopen(), fsl_fprintf(), fsl_fprintfv(), fsl_free(), fsl_getcwd(), fsl_getenv(), fsl_glob_list_append(), fsl_glob_list_clear(), fsl_glob_list_matches(), fsl_glob_list_parse(), fsl_glob_name_to_category(), fsl_gradient_color(), fsl_hash_policy_name(), fsl_hash_type_name(), fsl_htmlize(), fsl_htmlize_str(), fsl_htmlize_to_buffer(), fsl_htmlize_xlate(), fsl_id_bag_clear(), fsl_id_bag_contains(), fsl_id_bag_copy(), fsl_id_bag_count(), fsl_id_bag_first(), fsl_id_bag_insert(), fsl_id_bag_next(), fsl_id_bag_remove(), fsl_id_bag_reuse(), fsl_id_bag_swap(), fsl_id_bag_to_buffer(), fsl_input_f_buffer(), fsl_input_f_fd(), fsl_input_f_FILE(), fsl_invalid_utf8(), fsl_is_absolute_path(), fsl_is_file(), fsl_is_file_or_link(), fsl_is_reserved_fn(), fsl_is_rooted_in_ckout(), fsl_is_rooted_in_ckout2(), fsl_is_shunned_uuid(), fsl_is_simple_pathname(), fsl_is_symlink(), fsl_is_top_of_ckout(), fsl_is_uuid(), fsl_is_uuid_len(), fsl_isalnum(), fsl_isalpha(), fsl_isatty(), fsl_isdigit(), fsl_islower(), fsl_iso8601_to_julian(), fsl_isspace(), fsl_isupper(), fsl_julian_now(), fsl_julian_to_iso8601(), fsl_julian_to_unix(), fsl_last_path_sep(), fsl_leaves_compute(), fsl_leaves_computed_cleanup(), fsl_leaves_computed_count(), fsl_leaves_computed_has(), fsl_leaves_computed_latest(), fsl_library_version(), fsl_library_version_matches(), fsl_library_version_scm(), fsl_list_append(), fsl_list_clear(), fsl_list_index_of(), fsl_list_index_of_cstr(), fsl_list_reserve(), fsl_list_sort(), fsl_list_swap(), fsl_list_v_fsl_free(), fsl_list_visit(), fsl_list_visit_free(), fsl_list_visit_p(), fsl_looks_like_binary(), fsl_looks_like_utf8(), fsl_malloc(), fsl_md5_digest_to_base16(), fsl_md5_final(), fsl_md5_init(), fsl_md5_update(), fsl_md5_update_buffer(), fsl_md5_update_cstr(), fsl_md5_update_filename(), fsl_md5_update_stream(), fsl_md5sum_buffer(), fsl_md5sum_cstr(), fsl_md5sum_filename(), fsl_md5sum_stream(), fsl_might_be_artifact(), fsl_mkdir(), fsl_mkdir_for_file(), fsl_mprintf(), fsl_mprintfv(), fsl_msg_emit(), fsl_msg_f_fcli(), fsl_mtime_of_F_card(), fsl_mtime_of_manifest_file(), fsl_needs_ckout(), fsl_needs_repo(), fsl_os_str_free(), fsl_output(), fsl_output_f_buffer(), fsl_output_f_fd(), fsl_output_f_FILE(), fsl_output_f_fsl_cx(), fsl_outputf(), fsl_outputfv(), fsl_pathfinder_clear(), fsl_pathfinder_dir_add(), fsl_pathfinder_dir_add2(), fsl_pathfinder_ext_add(), fsl_pathfinder_ext_add2(), fsl_pathfinder_search(), fsl_pathfinder_split(), fsl_preferred_ckout_db_name(), fsl_randomness(), fsl_rc_cstr(), fsl_realloc(), fsl_realloc_f_stdalloc(), fsl_repo_blob_lookup(), fsl_repo_ckout(), fsl_repo_create(), fsl_repo_dir_names(), fsl_repo_extract(), fsl_repo_filename_fnid(), fsl_repo_forbids_delta_manifests(), fsl_repo_is_readonly(), fsl_repo_leaves_rebuild(), fsl_repo_login_clear(), fsl_repo_login_cookie_name(), fsl_repo_login_group_name(), fsl_repo_login_search_uid(), fsl_repo_manifest_write(), fsl_repo_open(), fsl_repo_open_ckout(), fsl_repo_project_code(), fsl_repo_rebuild(), fsl_repo_zip_sym_to_filename(), fsl_reserved_fn_check(), fsl_rgb_decode(), fsl_rgb_encode(), fsl_rid_is_a_checkin(), fsl_rid_is_leaf(), fsl_rid_is_version(), fsl_rid_to_artifact_uuid(), fsl_rid_to_uuid(), fsl_rid_to_uuid2(), fsl_rmdir(), fsl_sc_cleanup(), fsl_sc_self(), fsl_sc_tracer_init(), fsl_schema_ckout(), fsl_schema_config(), fsl_schema_forum(), fsl_schema_repo1(), fsl_schema_repo2(), fsl_schema_ticket(), fsl_schema_ticket_reports(), fsl_sha1_digest_to_base16(), fsl_sha1_final(), fsl_sha1_final_hex(), fsl_sha1_init(), fsl_sha1_shared_secret(), fsl_sha1_shared_secret2(), fsl_sha1_update(), fsl_sha1sum_buffer(), fsl_sha1sum_buffer2(), fsl_sha1sum_cstr(), fsl_sha1sum_filename(), fsl_sha1sum_stream(), fsl_sha1sum_update_stream(), fsl_sha3_digest_to_base16(), fsl_sha3_end(), fsl_sha3_hash_size_for_int(), fsl_sha3_init(), fsl_sha3_init2(), fsl_sha3_update(), fsl_sha3sum_buffer(), fsl_sha3sum_cstr(), fsl_sha3sum_filename(), fsl_sha3sum_stream(), fsl_simplify_sql(), fsl_simplify_sql_buffer(), fsl_snprintf(), fsl_snprintfv(), fsl_starts_with_bom_utf8(), fsl_stat(), fsl_stmt_bind_blob(), fsl_stmt_bind_blob_name(), fsl_stmt_bind_double(), fsl_stmt_bind_double_name(), fsl_stmt_bind_fmt(), fsl_stmt_bind_fmtv(), fsl_stmt_bind_id(), fsl_stmt_bind_id_name(), fsl_stmt_bind_int32(), fsl_stmt_bind_int32_name(), fsl_stmt_bind_int64(), fsl_stmt_bind_int64_name(), fsl_stmt_bind_null(), fsl_stmt_bind_null_name(), fsl_stmt_bind_step(), fsl_stmt_bind_step_v2(), fsl_stmt_bind_stepv(), fsl_stmt_bind_stepv_v2(), fsl_stmt_bind_text(), fsl_stmt_bind_text_name(), fsl_stmt_cached_yield(), fsl_stmt_clear_bindings(), fsl_stmt_col_count(), fsl_stmt_col_name(), fsl_stmt_db(), fsl_stmt_each(), fsl_stmt_each_f_dump(), fsl_stmt_finalize(), fsl_stmt_g_double(), fsl_stmt_g_id(), fsl_stmt_g_int32(), fsl_stmt_g_int64(), fsl_stmt_g_text(), fsl_stmt_get_blob(), fsl_stmt_get_double(), fsl_stmt_get_id(), fsl_stmt_get_int32(), fsl_stmt_get_int64(), fsl_stmt_get_text(), fsl_stmt_malloc(), fsl_stmt_param_count(), fsl_stmt_param_index(), fsl_stmt_reset(), fsl_stmt_reset2(), fsl_stmt_sql(), fsl_stmt_step(), fsl_str_bool(), fsl_str_glob(), fsl_str_is_date(), fsl_str_is_date2(), fsl_str_to_int(), fsl_str_to_size(), fsl_strcmp(), fsl_strcmp_cmp(), fsl_strdup(), fsl_stream(), fsl_stream_compare(), fsl_strftime(), fsl_strftime_unix(), fsl_stricmp(), fsl_stricmp_cmp(), fsl_strip_trailing_slashes(), fsl_strlcat(), fsl_strlcpy(), fsl_strlen(), fsl_strlen_utf8(), fsl_strncmp(), fsl_strndup(), fsl_strnicmp(), fsl_sym_to_rid(), fsl_sym_to_uuid(), fsl_symlink_copy(), fsl_symlink_create(), fsl_symlink_read(), fsl_sync_client(), fsl_tag_an_rid(), fsl_tag_id(), fsl_tag_prefix_char(), fsl_tag_sym(), fsl_temp_dirs_free(), fsl_temp_dirs_get(), fsl_timer_add(), fsl_timer_cpu(), fsl_timer_fetch(), fsl_timer_start(), fsl_timer_stop(), fsl_tkt_id_to_rids(), fsl_to_hex(), fsl_tolower(), fsl_toupper(), fsl_unicode_free(), fsl_unicode_to_utf8(), fsl_unix_to_julian(), fsl_uperm_add(), fsl_url_cleanup(), fsl_url_cleanup2(), fsl_url_next_query_arg(), fsl_url_parse(), fsl_url_render(), fsl_url_swap(), fsl_user_name_guess(), fsl_utf8_bom(), fsl_utf8_to_filename(), fsl_utf8_to_unicode(), fsl_uuid_to_rid(), fsl_uuidcmp(), fsl_validate16(), fsl_validate_hash(), fsl_verify_blob_hash(), fsl_vfile_changes_scan(), fsl_vfile_load(), fsl_vfile_pathname(), fsl_vfile_unload(), fsl_vfile_unload_except(), fsl_vpath_clear(), fsl_vpath_first(), fsl_vpath_last(), fsl_vpath_length(), fsl_vpath_midpoint(), fsl_vpath_next(), fsl_vpath_reverse(), fsl_vpath_shortest(), fsl_vpath_shortest_store_in_ancestor(), fsl_wiki_foreach_page(), fsl_wiki_latest_rid(), fsl_wiki_load_latest(), fsl_wiki_names_get(), fsl_wiki_page_exists(), fsl_wiki_save(), fsl_xfer_config_cleanup(), fsl_xfer_cx(), fsl_xfer_dbg_cleanup(), fsl_xfer_debug(), fsl_xfer_debug_f_buffer(), fsl_xfer_debug_f_FILE(), fsl_xfer_debugf(), fsl_xfer_debugfv(), fsl_xfer_error(), fsl_xfer_errorf(), fsl_xfer_errorfv(), fsl_xlink_listener(), fsl_zip_body(), fsl_zip_end(), fsl_zip_end_take(), fsl_zip_end_to_filename(), fsl_zip_file_add(), fsl_zip_finalize(), fsl_zip_root_set(), fsl_zip_timestamp_set_julian(), and fsl_zip_timestamp_set_unix().

◆ FSL_ID_T_PFMT

#define FSL_ID_T_PFMT   PRIi32

Fossil's fsl_id_t equivalent of C99's PRIi32 and friends.

ACHTUNG: see FSL_SIZE_T_PFMT for important details.

Definition at line 279 of file config.h.

◆ FSL_ID_T_SFMT

#define FSL_ID_T_SFMT   SCNi32

Fossil's fsl_id_t equivalent of C99's SCNi32 and friends.

Definition at line 285 of file config.h.

◆ FSL_INT_T_PFMT

#define FSL_INT_T_PFMT   PRIi64

Fossil's fsl_int_t equivalent of C99's PRIi32 and friends.

Definition at line 160 of file config.h.

◆ FSL_INT_T_SFMT

#define FSL_INT_T_SFMT   SCNi64

Fossil's fsl_int_t equivalent of C99's SCNi32 and friends.

Definition at line 165 of file config.h.

◆ FSL_JULIAN_T_PFMT

#define FSL_JULIAN_T_PFMT   ".17g"

An output format specifier for Julian-format doubles.

Definition at line 181 of file config.h.

◆ FSL_PLATFORM_IS_UNIX

#define FSL_PLATFORM_IS_UNIX   1

Definition at line 112 of file config.h.

◆ FSL_PLATFORM_IS_WINDOWS

#define FSL_PLATFORM_IS_WINDOWS   0

Definition at line 111 of file config.h.

◆ FSL_PLATFORM_PLATFORM

#define FSL_PLATFORM_PLATFORM   "unix"

Definition at line 113 of file config.h.

◆ FSL_SHA1_HARDENED

#define FSL_SHA1_HARDENED   1

If true, the library uses the "hardnened" SHA1 algorithm rather than the original.

See:

https://crypto.stackexchange.com/questions/44141/what-is-hardened-sha-1-how-does-it-work-and-how-much-protection-does-it-offer

https://shattered.io/

Definition at line 43 of file config.h.

◆ FSL_SIZE_T_PFMT

#define FSL_SIZE_T_PFMT   FSL_UINT_T_PFMT

Fossil's fsl_size_t equivalent of C99's PRIu32 and friends.

ACHTUNG: when passing arguments of this type of fsl_appendf(), or any function which uses it for formatting purposes, it is very important if if you pass literal integers OR enum values, that they be cast to fsl_size_t, or the va_list handling might extract the wrong number of bytes from the argument list, leading to really weird side-effects via what is effectively memory corruption.

That warning applies primarily to the following typedefs and their format specifiers: fsl_size_t, fsl_int_t, fsl_uint_t, fsl_id_t.

The warning does not apply to strongly-typed arguments, e.g. variables of the proper type, so long as the format specifier string matches the argument type.

For example:

fsl_size_t sz = 3; fsl_fprintf( stdout, "%"FSL_SIZE_T_PFMT" %"FSL_SIZE_T_PFMT\n", sz, // OK! 3 // BAD! See below... );

The "fix" is to cast the literal 3 to a fsl_size_t resp. the type appropriate for the format specifier. That ensures that there is no (or much less ;) confusion when va_arg() extracts arguments from the variadic array.

Reminders to self:

int i = 0; f_out(("#d: %"FSL_ID_T_PFMT" %"FSL_ID_T_PFMT" %"FSL_ID_T_PFMT"\n", ++i, 1, 2, 3)); f_out(("#d: %"FSL_SIZE_T_PFMT" %"FSL_ID_T_PFMT" %"FSL_SIZE_T_PFMT"\n", ++i, (fsl_size_t)1, (fsl_id_t)2, (fsl_size_t)3)); This one is the (generally) problematic case: f_out(("#d: %"FSL_SIZE_T_PFMT" %"FSL_ID_T_PFMT" %"FSL_SIZE_T_PFMT"\n", ++i, 1, 2, 3));

The above was Tested with gcc, clang, tcc on a 32-bit linux platform (it has not been problematic on 64-bit builds!). The above problem was reproduced on all compiler combinations i tricored. Current code (20130824) seems to be behaving well as long as callers always cast to help variadic arg handling DTRT.

Definition at line 247 of file config.h.

◆ FSL_SIZE_T_SFMT

#define FSL_SIZE_T_SFMT   FSL_UINT_T_SFMT

Fossil's fsl_int_t equivalent of C99's SCNu32 and friends.

Definition at line 253 of file config.h.

◆ FSL_SWITCH_FALL_THROUGH

#define FSL_SWITCH_FALL_THROUGH

Definition at line 344 of file config.h.

◆ FSL_TIME_T_PFMT

#define FSL_TIME_T_PFMT   PRIi64

Fossil's fsl_time_t equivalent of C99's PRIi32 and friends.

Definition at line 302 of file config.h.

◆ FSL_TIME_T_SFMT

#define FSL_TIME_T_SFMT   SCNi64

Fossil's fsl_time_t equivalent of C99's SCNi32 and friends.

Definition at line 308 of file config.h.

◆ FSL_UINT_T_PFMT

#define FSL_UINT_T_PFMT   PRIu64

Fossil's fsl_uint_t equivalent of C99's PRIu32 and friends.

Definition at line 170 of file config.h.

◆ FSL_UINT_T_SFMT

#define FSL_UINT_T_SFMT   SCNu64

Fossil's fsl_uint_t equivalent of C99's SCNu32 and friends.

Definition at line 175 of file config.h.

◆ HAVE_SIGACTION

#define HAVE_SIGACTION   1

Definition at line 118 of file config.h.

Typedef Documentation

◆ fsl_flag16_t

typedef uint16_t fsl_flag16_t

Definition at line 155 of file config.h.

◆ fsl_flag32_t

typedef uint32_t fsl_flag32_t

A 32-bit unsigned int type.

This typedef is primarily to improve documentation of the intent of function arguments and struct members.

Definition at line 154 of file config.h.

◆ fsl_id_t

typedef int32_t fsl_id_t

fsl_id_t is a signed integer type used to store database record IDs.

It is provided primarily for documentation/readability purposes, to avoid confusion with the widely varying integer semantics used by various APIs.

This type "could" be 32-bit (instead of 64) because the oldest/largest Fossil repo (the TCL tree, with 15 years of history) currently (August 2013) has only 131k RIDs. HOWEVER, changing this type can have side-effects vis-a-vis va_arg() deep in the fsl_appendf() implementation if FSL_ID_T_PFMT is not 100% correct for this typedef. After changing this, make sure to do a full clean rebuild and test thoroughly because changing a sizeof can produce weird side-effects (effectively memory corruption) on unclean rebuilds.

Definition at line 271 of file config.h.

◆ fsl_int_t

typedef int64_t fsl_int_t

fsl_int_t is a signed integer type used to denote "relative" ranges and lengths, or to tell a routine that it should try to figure out the length of some byte array itself (e.g.

by using fsl_strlen() on it). It is provided primarily for documentation/readability purposes, to avoid confusion with the widely varying integer semantics used by various APIs. This type is never used as a return type for functions which use "result code semantics". Those always use an unadorned integer type or some API-specific enum type.

The library typedefs this to a 64-bit type if possible, else a 32-bit type.

Definition at line 143 of file config.h.

◆ fsl_size_t

typedef uint64_t fsl_size_t

fsl_size_t is an unsigned integer type used to denote absolute ranges and lengths.

It is provided primarily for documentation/readability purposes, to avoid confusion with the widely varying integer semantics used by various APIs. While a 32-bit type is legal, a 64-bit type is required for "unusually large" repos and for some metrics reporting even for mid-sized repos.

Definition at line 192 of file config.h.

◆ fsl_time_t

typedef int64_t fsl_time_t

The type used to represent type values.

Unless noted otherwise, the general convention is Unix Epoch. That said, Fossil internally uses Julian Date for times, so this typedef is clearly the result of over-specification/over-thinking the problem. THAT said, application-level code more commonly works with Unix timestamps, so... here it is. Over-specified, perhaps, but not 100% unjustifiable.

Definition at line 296 of file config.h.

◆ fsl_uint_t

typedef uint64_t fsl_uint_t

The unsigned counterpart of fsl_int_t.

Definition at line 147 of file config.h.