mirror of https://gitee.com/openkylin/ldb.git
New upstream version 2.4.4
This commit is contained in:
parent
7002a95df1
commit
c5cb4168a1
|
@ -0,0 +1,283 @@
|
|||
ldb_add: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...)
|
||||
ldb_attr_casefold: char *(TALLOC_CTX *, const char *)
|
||||
ldb_attr_dn: int (const char *)
|
||||
ldb_attr_in_list: int (const char * const *, const char *)
|
||||
ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *)
|
||||
ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *)
|
||||
ldb_base64_decode: int (char *)
|
||||
ldb_base64_encode: char *(TALLOC_CTX *, const char *, int)
|
||||
ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *)
|
||||
ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val)
|
||||
ldb_binary_encode_string: char *(TALLOC_CTX *, const char *)
|
||||
ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t)
|
||||
ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t)
|
||||
ldb_check_critical_controls: int (struct ldb_control **)
|
||||
ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **)
|
||||
ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *)
|
||||
ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *)
|
||||
ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...)
|
||||
ldb_debug_add: void (struct ldb_context *, const char *, ...)
|
||||
ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level)
|
||||
ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...)
|
||||
ldb_delete: int (struct ldb_context *, struct ldb_dn *)
|
||||
ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...)
|
||||
ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...)
|
||||
ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
|
||||
ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *)
|
||||
ldb_dn_check_special: bool (struct ldb_dn *, const char *)
|
||||
ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val)
|
||||
ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *)
|
||||
ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *)
|
||||
ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *)
|
||||
ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *)
|
||||
ldb_dn_get_casefold: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_comp_num: int (struct ldb_dn *)
|
||||
ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int)
|
||||
ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int)
|
||||
ldb_dn_get_extended_comp_num: int (struct ldb_dn *)
|
||||
ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *)
|
||||
ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int)
|
||||
ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *)
|
||||
ldb_dn_get_linearized: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_get_rdn_name: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *)
|
||||
ldb_dn_has_extended: bool (struct ldb_dn *)
|
||||
ldb_dn_is_null: bool (struct ldb_dn *)
|
||||
ldb_dn_is_special: bool (struct ldb_dn *)
|
||||
ldb_dn_is_valid: bool (struct ldb_dn *)
|
||||
ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_minimise: bool (struct ldb_dn *)
|
||||
ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *)
|
||||
ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...)
|
||||
ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int)
|
||||
ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int)
|
||||
ldb_dn_remove_extended_components: void (struct ldb_dn *)
|
||||
ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val)
|
||||
ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *)
|
||||
ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *)
|
||||
ldb_dn_validate: bool (struct ldb_dn *)
|
||||
ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *)
|
||||
ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int)
|
||||
ldb_errstring: const char *(struct ldb_context *)
|
||||
ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **)
|
||||
ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_filter_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
|
||||
ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *)
|
||||
ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_create_perms: unsigned int (struct ldb_context *)
|
||||
ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_event_context: struct tevent_context *(struct ldb_context *)
|
||||
ldb_get_flags: unsigned int (struct ldb_context *)
|
||||
ldb_get_opaque: void *(struct ldb_context *, const char *)
|
||||
ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_global_init: int (void)
|
||||
ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *)
|
||||
ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
|
||||
ldb_handle_use_global_event_context: void (struct ldb_handle *)
|
||||
ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
|
||||
ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
|
||||
ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *)
|
||||
ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
|
||||
ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
|
||||
ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **)
|
||||
ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *)
|
||||
ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *)
|
||||
ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *)
|
||||
ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *)
|
||||
ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **)
|
||||
ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *)
|
||||
ldb_load_modules: int (struct ldb_context *, const char **)
|
||||
ldb_map_add: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_delete: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *)
|
||||
ldb_map_modify: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_rename: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_search: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
|
||||
ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope)
|
||||
ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *)
|
||||
ldb_match_msg_objectclass: int (const struct ldb_message *, const char *)
|
||||
ldb_mod_register_control: int (struct ldb_module *, const char *)
|
||||
ldb_modify: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *)
|
||||
ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **)
|
||||
ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int)
|
||||
ldb_module_flags: uint32_t (struct ldb_context *)
|
||||
ldb_module_get_ctx: struct ldb_context *(struct ldb_module *)
|
||||
ldb_module_get_name: const char *(struct ldb_module *)
|
||||
ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *)
|
||||
ldb_module_get_private: void *(struct ldb_module *)
|
||||
ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *)
|
||||
ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **)
|
||||
ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *)
|
||||
ldb_module_next: struct ldb_module *(struct ldb_module *)
|
||||
ldb_module_popt_options: struct poptOption **(struct ldb_context *)
|
||||
ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **)
|
||||
ldb_module_send_referral: int (struct ldb_request *, char *)
|
||||
ldb_module_set_next: void (struct ldb_module *, struct ldb_module *)
|
||||
ldb_module_set_private: void (struct ldb_module *, void *)
|
||||
ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type)
|
||||
ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *)
|
||||
ldb_modules_load: int (const char *, const char *)
|
||||
ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int)
|
||||
ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **)
|
||||
ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...)
|
||||
ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *)
|
||||
ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *)
|
||||
ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *)
|
||||
ldb_msg_add_string: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **)
|
||||
ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *)
|
||||
ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *)
|
||||
ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *)
|
||||
ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *)
|
||||
ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **)
|
||||
ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *)
|
||||
ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *)
|
||||
ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *)
|
||||
ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int)
|
||||
ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *)
|
||||
ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double)
|
||||
ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int)
|
||||
ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t)
|
||||
ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int)
|
||||
ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t)
|
||||
ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
|
||||
ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t)
|
||||
ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *)
|
||||
ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *)
|
||||
ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *)
|
||||
ldb_msg_new: struct ldb_message *(TALLOC_CTX *)
|
||||
ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **)
|
||||
ldb_msg_remove_attr: void (struct ldb_message *, const char *)
|
||||
ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *)
|
||||
ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_msg_sort_elements: void (struct ldb_message *)
|
||||
ldb_next_del_trans: int (struct ldb_module *)
|
||||
ldb_next_end_trans: int (struct ldb_module *)
|
||||
ldb_next_init: int (struct ldb_module *)
|
||||
ldb_next_prepare_commit: int (struct ldb_module *)
|
||||
ldb_next_read_lock: int (struct ldb_module *)
|
||||
ldb_next_read_unlock: int (struct ldb_module *)
|
||||
ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_next_request: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_next_start_trans: int (struct ldb_module *)
|
||||
ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_options_copy: const char **(TALLOC_CTX *, const char **)
|
||||
ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
|
||||
ldb_options_get: const char **(struct ldb_context *)
|
||||
ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
|
||||
ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *)
|
||||
ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **)
|
||||
ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *)
|
||||
ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *)
|
||||
ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *)
|
||||
ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *)
|
||||
ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t)
|
||||
ldb_register_backend: int (const char *, ldb_connect_fn, bool)
|
||||
ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *)
|
||||
ldb_register_hook: int (ldb_hook_fn)
|
||||
ldb_register_module: int (const struct ldb_module_ops *)
|
||||
ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *)
|
||||
ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *)
|
||||
ldb_req_get_custom_flags: uint32_t (struct ldb_request *)
|
||||
ldb_req_is_untrusted: bool (struct ldb_request *)
|
||||
ldb_req_location: const char *(struct ldb_request *)
|
||||
ldb_req_mark_trusted: void (struct ldb_request *)
|
||||
ldb_req_mark_untrusted: void (struct ldb_request *)
|
||||
ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t)
|
||||
ldb_req_set_location: void (struct ldb_request *, const char *)
|
||||
ldb_request: int (struct ldb_context *, struct ldb_request *)
|
||||
ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *)
|
||||
ldb_request_done: int (struct ldb_request *, int)
|
||||
ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *)
|
||||
ldb_request_get_status: int (struct ldb_request *)
|
||||
ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *)
|
||||
ldb_request_set_state: void (struct ldb_request *, int)
|
||||
ldb_reset_err_string: void (struct ldb_context *)
|
||||
ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***)
|
||||
ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *)
|
||||
ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *)
|
||||
ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *)
|
||||
ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
|
||||
ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
|
||||
ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
|
||||
ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
|
||||
ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
|
||||
ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
|
||||
ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...)
|
||||
ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *)
|
||||
ldb_set_create_perms: void (struct ldb_context *, unsigned int)
|
||||
ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *)
|
||||
ldb_set_debug_stderr: int (struct ldb_context *)
|
||||
ldb_set_default_dns: void (struct ldb_context *)
|
||||
ldb_set_errstring: void (struct ldb_context *, const char *)
|
||||
ldb_set_event_context: void (struct ldb_context *, struct tevent_context *)
|
||||
ldb_set_flags: void (struct ldb_context *, unsigned int)
|
||||
ldb_set_modules_dir: void (struct ldb_context *, const char *)
|
||||
ldb_set_opaque: int (struct ldb_context *, const char *, void *)
|
||||
ldb_set_require_private_event_context: void (struct ldb_context *)
|
||||
ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int)
|
||||
ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *)
|
||||
ldb_set_utf8_default: void (struct ldb_context *)
|
||||
ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t))
|
||||
ldb_setup_wellknown_attributes: int (struct ldb_context *)
|
||||
ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *)
|
||||
ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *)
|
||||
ldb_strerror: const char *(int)
|
||||
ldb_string_to_time: time_t (const char *)
|
||||
ldb_string_utc_to_time: time_t (const char *)
|
||||
ldb_timestring: char *(TALLOC_CTX *, time_t)
|
||||
ldb_timestring_utc: char *(TALLOC_CTX *, time_t)
|
||||
ldb_transaction_cancel: int (struct ldb_context *)
|
||||
ldb_transaction_cancel_noerr: int (struct ldb_context *)
|
||||
ldb_transaction_commit: int (struct ldb_context *)
|
||||
ldb_transaction_prepare_commit: int (struct ldb_context *)
|
||||
ldb_transaction_start: int (struct ldb_context *)
|
||||
ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *)
|
||||
ldb_unpack_data_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
|
||||
ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
|
||||
ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *)
|
||||
ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *)
|
||||
ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *)
|
||||
ldb_val_string_cmp: int (const struct ldb_val *, const char *)
|
||||
ldb_val_to_time: int (const struct ldb_val *, time_t *)
|
||||
ldb_valid_attr_name: int (const char *)
|
||||
ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list)
|
||||
ldb_wait: int (struct ldb_handle *, enum ldb_wait_type)
|
|
@ -0,0 +1,291 @@
|
|||
ldb_add: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...)
|
||||
ldb_attr_casefold: char *(TALLOC_CTX *, const char *)
|
||||
ldb_attr_dn: int (const char *)
|
||||
ldb_attr_in_list: int (const char * const *, const char *)
|
||||
ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *)
|
||||
ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, const char *)
|
||||
ldb_base64_decode: int (char *)
|
||||
ldb_base64_encode: char *(TALLOC_CTX *, const char *, int)
|
||||
ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *)
|
||||
ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val)
|
||||
ldb_binary_encode_string: char *(TALLOC_CTX *, const char *)
|
||||
ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
|
||||
ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t)
|
||||
ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t)
|
||||
ldb_check_critical_controls: int (struct ldb_control **)
|
||||
ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char **)
|
||||
ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *)
|
||||
ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, TALLOC_CTX *, struct ldb_control *)
|
||||
ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...)
|
||||
ldb_debug_add: void (struct ldb_context *, const char *, ...)
|
||||
ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level)
|
||||
ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, ...)
|
||||
ldb_delete: int (struct ldb_context *, struct ldb_dn *)
|
||||
ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...)
|
||||
ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...)
|
||||
ldb_dn_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
|
||||
ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *)
|
||||
ldb_dn_check_special: bool (struct ldb_dn *, const char *)
|
||||
ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val)
|
||||
ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const struct ldb_dn_extended_syntax *)
|
||||
ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *)
|
||||
ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct ldb_context *, const char *)
|
||||
ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const struct ldb_val *)
|
||||
ldb_dn_get_casefold: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_comp_num: int (struct ldb_dn *)
|
||||
ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int)
|
||||
ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int)
|
||||
ldb_dn_get_extended_comp_num: int (struct ldb_dn *)
|
||||
ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const char *)
|
||||
ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int)
|
||||
ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *)
|
||||
ldb_dn_get_linearized: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
|
||||
ldb_dn_get_rdn_name: const char *(struct ldb_dn *)
|
||||
ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *)
|
||||
ldb_dn_has_extended: bool (struct ldb_dn *)
|
||||
ldb_dn_is_null: bool (struct ldb_dn *)
|
||||
ldb_dn_is_special: bool (struct ldb_dn *)
|
||||
ldb_dn_is_valid: bool (struct ldb_dn *)
|
||||
ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
|
||||
ldb_dn_minimise: bool (struct ldb_dn *)
|
||||
ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *)
|
||||
ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *, ...)
|
||||
ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int)
|
||||
ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int)
|
||||
ldb_dn_remove_extended_components: void (struct ldb_dn *)
|
||||
ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct ldb_val)
|
||||
ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const struct ldb_val *)
|
||||
ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *)
|
||||
ldb_dn_validate: bool (struct ldb_dn *)
|
||||
ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *)
|
||||
ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int)
|
||||
ldb_errstring: const char *(struct ldb_context *)
|
||||
ldb_extended: int (struct ldb_context *, const char *, void *, struct ldb_result **)
|
||||
ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_filter_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
|
||||
ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *)
|
||||
ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_create_perms: unsigned int (struct ldb_context *)
|
||||
ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_event_context: struct tevent_context *(struct ldb_context *)
|
||||
ldb_get_flags: unsigned int (struct ldb_context *)
|
||||
ldb_get_opaque: void *(struct ldb_context *, const char *)
|
||||
ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *)
|
||||
ldb_global_init: int (void)
|
||||
ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *)
|
||||
ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
|
||||
ldb_handle_use_global_event_context: void (struct ldb_handle *)
|
||||
ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
|
||||
ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
|
||||
ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *)
|
||||
ldb_ldif_message_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
|
||||
ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
|
||||
ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, struct ldb_dn **)
|
||||
ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *)
|
||||
ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *)
|
||||
ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct ldif_read_file_state *)
|
||||
ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *)
|
||||
ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **)
|
||||
ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), void *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *)
|
||||
ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct ldb_ldif *)
|
||||
ldb_load_modules: int (struct ldb_context *, const char **)
|
||||
ldb_map_add: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_delete: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, const struct ldb_map_objectclass *, const char * const *, const char *, const char *)
|
||||
ldb_map_modify: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_rename: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_map_search: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_match_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
|
||||
ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope)
|
||||
ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *)
|
||||
ldb_match_msg_objectclass: int (const struct ldb_message *, const char *)
|
||||
ldb_mod_register_control: int (struct ldb_module *, const char *)
|
||||
ldb_modify: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *)
|
||||
ldb_module_connect_backend: int (struct ldb_context *, const char *, const char **, struct ldb_module **)
|
||||
ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct ldb_extended *, int)
|
||||
ldb_module_flags: uint32_t (struct ldb_context *)
|
||||
ldb_module_get_ctx: struct ldb_context *(struct ldb_module *)
|
||||
ldb_module_get_name: const char *(struct ldb_module *)
|
||||
ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *)
|
||||
ldb_module_get_private: void *(struct ldb_module *)
|
||||
ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *)
|
||||
ldb_module_load_list: int (struct ldb_context *, const char **, struct ldb_module *, struct ldb_module **)
|
||||
ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const char *, const struct ldb_module_ops *)
|
||||
ldb_module_next: struct ldb_module *(struct ldb_module *)
|
||||
ldb_module_popt_options: struct poptOption **(struct ldb_context *)
|
||||
ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct ldb_control **)
|
||||
ldb_module_send_referral: int (struct ldb_request *, char *)
|
||||
ldb_module_set_next: void (struct ldb_module *, struct ldb_module *)
|
||||
ldb_module_set_private: void (struct ldb_module *, void *)
|
||||
ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type)
|
||||
ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX *, const char *)
|
||||
ldb_modules_load: int (const char *, const char *)
|
||||
ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, int)
|
||||
ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct ldb_message_element **)
|
||||
ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...)
|
||||
ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *)
|
||||
ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *)
|
||||
ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct ldb_val *)
|
||||
ldb_msg_add_string: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_add_string_flags: int (struct ldb_message *, const char *, const char *, int)
|
||||
ldb_msg_add_value: int (struct ldb_message *, const char *, const struct ldb_val *, struct ldb_message_element **)
|
||||
ldb_msg_append_fmt: int (struct ldb_message *, int, const char *, const char *, ...)
|
||||
ldb_msg_append_linearized_dn: int (struct ldb_message *, const char *, struct ldb_dn *, int)
|
||||
ldb_msg_append_steal_string: int (struct ldb_message *, const char *, char *, int)
|
||||
ldb_msg_append_steal_value: int (struct ldb_message *, const char *, struct ldb_val *, int)
|
||||
ldb_msg_append_string: int (struct ldb_message *, const char *, const char *, int)
|
||||
ldb_msg_append_value: int (struct ldb_message *, const char *, const struct ldb_val *, int)
|
||||
ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct ldb_message *)
|
||||
ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *)
|
||||
ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *)
|
||||
ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, struct ldb_message *)
|
||||
ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message *, struct ldb_message *, struct ldb_message **)
|
||||
ldb_msg_element_add_value: int (TALLOC_CTX *, struct ldb_message_element *, const struct ldb_val *)
|
||||
ldb_msg_element_compare: int (struct ldb_message_element *, struct ldb_message_element *)
|
||||
ldb_msg_element_compare_name: int (struct ldb_message_element *, struct ldb_message_element *)
|
||||
ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const struct ldb_message_element *)
|
||||
ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int)
|
||||
ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, const char *)
|
||||
ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, double)
|
||||
ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int)
|
||||
ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, int64_t)
|
||||
ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const char *, unsigned int)
|
||||
ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char *, uint64_t)
|
||||
ldb_msg_find_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
|
||||
ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_t)
|
||||
ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, const char *)
|
||||
ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const char *)
|
||||
ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct ldb_val *)
|
||||
ldb_msg_new: struct ldb_message *(TALLOC_CTX *)
|
||||
ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message *, struct ldb_message **)
|
||||
ldb_msg_remove_attr: void (struct ldb_message *, const char *)
|
||||
ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element *)
|
||||
ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *)
|
||||
ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *)
|
||||
ldb_msg_sort_elements: void (struct ldb_message *)
|
||||
ldb_next_del_trans: int (struct ldb_module *)
|
||||
ldb_next_end_trans: int (struct ldb_module *)
|
||||
ldb_next_init: int (struct ldb_module *)
|
||||
ldb_next_prepare_commit: int (struct ldb_module *)
|
||||
ldb_next_read_lock: int (struct ldb_module *)
|
||||
ldb_next_read_unlock: int (struct ldb_module *)
|
||||
ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_next_request: int (struct ldb_module *, struct ldb_request *)
|
||||
ldb_next_start_trans: int (struct ldb_module *)
|
||||
ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_options_copy: const char **(TALLOC_CTX *, const char **)
|
||||
ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
|
||||
ldb_options_get: const char **(struct ldb_context *)
|
||||
ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
|
||||
ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, TALLOC_CTX *, const char *)
|
||||
ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, TALLOC_CTX *, const char **)
|
||||
ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *)
|
||||
ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, const char *)
|
||||
ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const struct ldb_parse_tree *)
|
||||
ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct ldb_parse_tree *, void *), void *)
|
||||
ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t)
|
||||
ldb_register_backend: int (const char *, ldb_connect_fn, bool)
|
||||
ldb_register_extended_match_rule: int (struct ldb_context *, const struct ldb_extended_match_rule *)
|
||||
ldb_register_hook: int (ldb_hook_fn)
|
||||
ldb_register_module: int (const struct ldb_module_ops *)
|
||||
ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *)
|
||||
ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *)
|
||||
ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *)
|
||||
ldb_req_get_custom_flags: uint32_t (struct ldb_request *)
|
||||
ldb_req_is_untrusted: bool (struct ldb_request *)
|
||||
ldb_req_location: const char *(struct ldb_request *)
|
||||
ldb_req_mark_trusted: void (struct ldb_request *)
|
||||
ldb_req_mark_untrusted: void (struct ldb_request *)
|
||||
ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t)
|
||||
ldb_req_set_location: void (struct ldb_request *, const char *)
|
||||
ldb_request: int (struct ldb_context *, struct ldb_request *)
|
||||
ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *)
|
||||
ldb_request_done: int (struct ldb_request *, int)
|
||||
ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char *)
|
||||
ldb_request_get_status: int (struct ldb_request *)
|
||||
ldb_request_replace_control: int (struct ldb_request *, const char *, bool, void *)
|
||||
ldb_request_set_state: void (struct ldb_request *, int)
|
||||
ldb_reset_err_string: void (struct ldb_context *)
|
||||
ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct ldb_control ***)
|
||||
ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned int, const char *)
|
||||
ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, unsigned int, const struct ldb_schema_syntax *)
|
||||
ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct ldb_context *, const char *)
|
||||
ldb_schema_attribute_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
|
||||
ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
|
||||
ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
|
||||
ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
|
||||
ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
|
||||
ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
|
||||
ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...)
|
||||
ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *)
|
||||
ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, uint64_t *)
|
||||
ldb_set_create_perms: void (struct ldb_context *, unsigned int)
|
||||
ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum ldb_debug_level, const char *, va_list), void *)
|
||||
ldb_set_debug_stderr: int (struct ldb_context *)
|
||||
ldb_set_default_dns: void (struct ldb_context *)
|
||||
ldb_set_errstring: void (struct ldb_context *, const char *)
|
||||
ldb_set_event_context: void (struct ldb_context *, struct tevent_context *)
|
||||
ldb_set_flags: void (struct ldb_context *, unsigned int)
|
||||
ldb_set_modules_dir: void (struct ldb_context *, const char *)
|
||||
ldb_set_opaque: int (struct ldb_context *, const char *, void *)
|
||||
ldb_set_require_private_event_context: void (struct ldb_context *)
|
||||
ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int)
|
||||
ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request *, struct ldb_request *)
|
||||
ldb_set_utf8_default: void (struct ldb_context *)
|
||||
ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void *, const char *, size_t))
|
||||
ldb_setup_wellknown_attributes: int (struct ldb_context *)
|
||||
ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *)
|
||||
ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct ldb_context *, const char *)
|
||||
ldb_strerror: const char *(int)
|
||||
ldb_string_to_time: time_t (const char *)
|
||||
ldb_string_utc_to_time: time_t (const char *)
|
||||
ldb_timestring: char *(TALLOC_CTX *, time_t)
|
||||
ldb_timestring_utc: char *(TALLOC_CTX *, time_t)
|
||||
ldb_transaction_cancel: int (struct ldb_context *)
|
||||
ldb_transaction_cancel_noerr: int (struct ldb_context *)
|
||||
ldb_transaction_commit: int (struct ldb_context *)
|
||||
ldb_transaction_prepare_commit: int (struct ldb_context *)
|
||||
ldb_transaction_start: int (struct ldb_context *)
|
||||
ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *)
|
||||
ldb_unpack_data_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
|
||||
ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
|
||||
ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *)
|
||||
ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *)
|
||||
ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *)
|
||||
ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct ldb_map_attribute *, const struct ldb_val *)
|
||||
ldb_val_string_cmp: int (const struct ldb_val *, const char *)
|
||||
ldb_val_to_time: int (const struct ldb_val *, time_t *)
|
||||
ldb_valid_attr_name: int (const char *)
|
||||
ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, va_list)
|
||||
ldb_wait: int (struct ldb_handle *, enum ldb_wait_type)
|
|
@ -0,0 +1,3 @@
|
|||
pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
|
||||
pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
|
||||
pyldb_check_type: bool (PyObject *, const char *)
|
|
@ -0,0 +1,3 @@
|
|||
pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
|
||||
pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
|
||||
pyldb_check_type: bool (PyObject *, const char *)
|
|
@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
import os, sys, inspect
|
||||
|
||||
VERSION="2.0.21"
|
||||
VERSION="2.0.24"
|
||||
REVISION="x"
|
||||
GIT="x"
|
||||
INSTALL="x"
|
||||
|
@ -164,4 +164,3 @@ if __name__ == '__main__':
|
|||
|
||||
from waflib import Scripting
|
||||
Scripting.waf_entry_point(cwd, VERSION, wafdir[0])
|
||||
|
||||
|
|
|
@ -10,9 +10,14 @@ cat <<EOF
|
|||
set height 0
|
||||
set width 0
|
||||
EOF
|
||||
nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | egrep -v ' (__bss_start|_edata|_init|_fini|_end)' | cut -c3- | sort | while read s; do
|
||||
|
||||
# On older linker versions _init|_fini symbols are not hidden.
|
||||
objdump --dynamic-syms "${SHAREDLIB}" | \
|
||||
awk '$0 !~ /.hidden/ {if ($2 == "g" && $3 ~ /D(F|O)/ && $4 ~ /(.bss|.rodata|.text)/) print $NF}' | \
|
||||
sort | \
|
||||
while read -r s; do
|
||||
echo "echo $s: "
|
||||
echo p $s
|
||||
echo p "${s}"
|
||||
done
|
||||
) > $GDBSCRIPT
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ LIB_PATH="shared"
|
|||
|
||||
os.environ['PYTHONUNBUFFERED'] = '1'
|
||||
|
||||
if Context.HEXVERSION not in (0x2001500,):
|
||||
if Context.HEXVERSION not in (0x2001800,):
|
||||
Logs.error('''
|
||||
Please use the version of waf that comes with Samba, not
|
||||
a system installed version. See http://wiki.samba.org/index.php/Waf
|
||||
|
|
260
common/ldb_msg.c
260
common/ldb_msg.c
|
@ -417,6 +417,47 @@ int ldb_msg_add(struct ldb_message *msg,
|
|||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* add a value to a message element
|
||||
*/
|
||||
int ldb_msg_element_add_value(TALLOC_CTX *mem_ctx,
|
||||
struct ldb_message_element *el,
|
||||
const struct ldb_val *val)
|
||||
{
|
||||
struct ldb_val *vals;
|
||||
|
||||
if (el->flags & LDB_FLAG_INTERNAL_SHARED_VALUES) {
|
||||
/*
|
||||
* Another message is using this message element's values array,
|
||||
* so we don't want to make any modifications to the original
|
||||
* message, or potentially invalidate its own values by calling
|
||||
* talloc_realloc(). Make a copy instead.
|
||||
*/
|
||||
el->flags &= ~LDB_FLAG_INTERNAL_SHARED_VALUES;
|
||||
|
||||
vals = talloc_array(mem_ctx, struct ldb_val,
|
||||
el->num_values + 1);
|
||||
if (vals == NULL) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
if (el->values != NULL) {
|
||||
memcpy(vals, el->values, el->num_values * sizeof(struct ldb_val));
|
||||
}
|
||||
} else {
|
||||
vals = talloc_realloc(mem_ctx, el->values, struct ldb_val,
|
||||
el->num_values + 1);
|
||||
if (vals == NULL) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
}
|
||||
el->values = vals;
|
||||
el->values[el->num_values] = *val;
|
||||
el->num_values++;
|
||||
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
add a value to a message
|
||||
*/
|
||||
|
@ -426,7 +467,6 @@ int ldb_msg_add_value(struct ldb_message *msg,
|
|||
struct ldb_message_element **return_el)
|
||||
{
|
||||
struct ldb_message_element *el;
|
||||
struct ldb_val *vals;
|
||||
int ret;
|
||||
|
||||
el = ldb_msg_find_element(msg, attr_name);
|
||||
|
@ -437,14 +477,10 @@ int ldb_msg_add_value(struct ldb_message *msg,
|
|||
}
|
||||
}
|
||||
|
||||
vals = talloc_realloc(msg->elements, el->values, struct ldb_val,
|
||||
el->num_values+1);
|
||||
if (!vals) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
ret = ldb_msg_element_add_value(msg->elements, el, val);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
el->values = vals;
|
||||
el->values[el->num_values] = *val;
|
||||
el->num_values++;
|
||||
|
||||
if (return_el) {
|
||||
*return_el = el;
|
||||
|
@ -473,12 +509,15 @@ int ldb_msg_add_steal_value(struct ldb_message *msg,
|
|||
|
||||
|
||||
/*
|
||||
add a string element to a message
|
||||
add a string element to a message, specifying flags
|
||||
*/
|
||||
int ldb_msg_add_string(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str)
|
||||
int ldb_msg_add_string_flags(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str,
|
||||
int flags)
|
||||
{
|
||||
struct ldb_val val;
|
||||
int ret;
|
||||
struct ldb_message_element *el = NULL;
|
||||
|
||||
val.data = discard_const_p(uint8_t, str);
|
||||
val.length = strlen(str);
|
||||
|
@ -488,7 +527,25 @@ int ldb_msg_add_string(struct ldb_message *msg,
|
|||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
return ldb_msg_add_value(msg, attr_name, &val, NULL);
|
||||
ret = ldb_msg_add_value(msg, attr_name, &val, &el);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (flags != 0) {
|
||||
el->flags = flags;
|
||||
}
|
||||
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
add a string element to a message
|
||||
*/
|
||||
int ldb_msg_add_string(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str)
|
||||
{
|
||||
return ldb_msg_add_string_flags(msg, attr_name, str, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -550,6 +607,142 @@ int ldb_msg_add_fmt(struct ldb_message *msg,
|
|||
return ldb_msg_add_steal_value(msg, attr_name, &val);
|
||||
}
|
||||
|
||||
static int ldb_msg_append_value_impl(struct ldb_message *msg,
|
||||
const char *attr_name,
|
||||
const struct ldb_val *val,
|
||||
int flags,
|
||||
struct ldb_message_element **return_el)
|
||||
{
|
||||
struct ldb_message_element *el = NULL;
|
||||
int ret;
|
||||
|
||||
ret = ldb_msg_add_empty(msg, attr_name, flags, &el);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = ldb_msg_element_add_value(msg->elements, el, val);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (return_el != NULL) {
|
||||
*return_el = el;
|
||||
}
|
||||
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
append a value to a message
|
||||
*/
|
||||
int ldb_msg_append_value(struct ldb_message *msg,
|
||||
const char *attr_name,
|
||||
const struct ldb_val *val,
|
||||
int flags)
|
||||
{
|
||||
return ldb_msg_append_value_impl(msg, attr_name, val, flags, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
append a value to a message, stealing it into the 'right' place
|
||||
*/
|
||||
int ldb_msg_append_steal_value(struct ldb_message *msg,
|
||||
const char *attr_name,
|
||||
struct ldb_val *val,
|
||||
int flags)
|
||||
{
|
||||
int ret;
|
||||
struct ldb_message_element *el = NULL;
|
||||
|
||||
ret = ldb_msg_append_value_impl(msg, attr_name, val, flags, &el);
|
||||
if (ret == LDB_SUCCESS) {
|
||||
talloc_steal(el->values, val->data);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
append a string element to a message, stealing it into the 'right' place
|
||||
*/
|
||||
int ldb_msg_append_steal_string(struct ldb_message *msg,
|
||||
const char *attr_name, char *str,
|
||||
int flags)
|
||||
{
|
||||
struct ldb_val val;
|
||||
|
||||
val.data = (uint8_t *)str;
|
||||
val.length = strlen(str);
|
||||
|
||||
if (val.length == 0) {
|
||||
/* allow empty strings as non-existent attributes */
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
return ldb_msg_append_steal_value(msg, attr_name, &val, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
append a string element to a message
|
||||
*/
|
||||
int ldb_msg_append_string(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str, int flags)
|
||||
{
|
||||
struct ldb_val val;
|
||||
|
||||
val.data = discard_const_p(uint8_t, str);
|
||||
val.length = strlen(str);
|
||||
|
||||
if (val.length == 0) {
|
||||
/* allow empty strings as non-existent attributes */
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
||||
return ldb_msg_append_value(msg, attr_name, &val, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
append a DN element to a message
|
||||
WARNING: this uses the linearized string from the dn, and does not
|
||||
copy the string.
|
||||
*/
|
||||
int ldb_msg_append_linearized_dn(struct ldb_message *msg, const char *attr_name,
|
||||
struct ldb_dn *dn, int flags)
|
||||
{
|
||||
char *str = ldb_dn_alloc_linearized(msg, dn);
|
||||
|
||||
if (str == NULL) {
|
||||
/* we don't want to have unknown DNs added */
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
return ldb_msg_append_steal_string(msg, attr_name, str, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
append a printf formatted element to a message
|
||||
*/
|
||||
int ldb_msg_append_fmt(struct ldb_message *msg, int flags,
|
||||
const char *attr_name, const char *fmt, ...)
|
||||
{
|
||||
struct ldb_val val;
|
||||
va_list ap;
|
||||
char *str = NULL;
|
||||
|
||||
va_start(ap, fmt);
|
||||
str = talloc_vasprintf(msg, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (str == NULL) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
val.data = (uint8_t *)str;
|
||||
val.length = strlen(str);
|
||||
|
||||
return ldb_msg_append_steal_value(msg, attr_name, &val, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
compare two ldb_message_element structures
|
||||
assumes case sensitive comparison
|
||||
|
@ -833,11 +1026,7 @@ void ldb_msg_sort_elements(struct ldb_message *msg)
|
|||
ldb_msg_element_compare_name);
|
||||
}
|
||||
|
||||
/*
|
||||
shallow copy a message - copying only the elements array so that the caller
|
||||
can safely add new elements without changing the message
|
||||
*/
|
||||
struct ldb_message *ldb_msg_copy_shallow(TALLOC_CTX *mem_ctx,
|
||||
static struct ldb_message *ldb_msg_copy_shallow_impl(TALLOC_CTX *mem_ctx,
|
||||
const struct ldb_message *msg)
|
||||
{
|
||||
struct ldb_message *msg2;
|
||||
|
@ -863,6 +1052,35 @@ failed:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
shallow copy a message - copying only the elements array so that the caller
|
||||
can safely add new elements without changing the message
|
||||
*/
|
||||
struct ldb_message *ldb_msg_copy_shallow(TALLOC_CTX *mem_ctx,
|
||||
const struct ldb_message *msg)
|
||||
{
|
||||
struct ldb_message *msg2;
|
||||
unsigned int i;
|
||||
|
||||
msg2 = ldb_msg_copy_shallow_impl(mem_ctx, msg);
|
||||
if (msg2 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < msg2->num_elements; ++i) {
|
||||
/*
|
||||
* Mark this message's elements as sharing their values with the
|
||||
* original message, so that we don't inadvertently modify or
|
||||
* free them. We don't mark the original message element as
|
||||
* shared, so the original message element should not be
|
||||
* modified or freed while the shallow copy lives.
|
||||
*/
|
||||
struct ldb_message_element *el = &msg2->elements[i];
|
||||
el->flags |= LDB_FLAG_INTERNAL_SHARED_VALUES;
|
||||
}
|
||||
|
||||
return msg2;
|
||||
}
|
||||
|
||||
/*
|
||||
copy a message, allocating new memory for all parts
|
||||
|
@ -873,7 +1091,7 @@ struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx,
|
|||
struct ldb_message *msg2;
|
||||
unsigned int i, j;
|
||||
|
||||
msg2 = ldb_msg_copy_shallow(mem_ctx, msg);
|
||||
msg2 = ldb_msg_copy_shallow_impl(mem_ctx, msg);
|
||||
if (msg2 == NULL) return NULL;
|
||||
|
||||
if (msg2->dn != NULL) {
|
||||
|
@ -894,6 +1112,12 @@ struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx,
|
|||
goto failed;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Since we copied this element's values, we can mark them as
|
||||
* not shared.
|
||||
*/
|
||||
el->flags &= ~LDB_FLAG_INTERNAL_SHARED_VALUES;
|
||||
}
|
||||
|
||||
return msg2;
|
||||
|
|
|
@ -1981,6 +1981,12 @@ int ldb_msg_add_empty(struct ldb_message *msg,
|
|||
int flags,
|
||||
struct ldb_message_element **return_el);
|
||||
|
||||
/**
|
||||
add a value to a message element
|
||||
*/
|
||||
int ldb_msg_element_add_value(TALLOC_CTX *mem_ctx,
|
||||
struct ldb_message_element *el,
|
||||
const struct ldb_val *val);
|
||||
/**
|
||||
add a element to a ldb_message
|
||||
*/
|
||||
|
@ -1996,12 +2002,36 @@ int ldb_msg_add_steal_value(struct ldb_message *msg,
|
|||
struct ldb_val *val);
|
||||
int ldb_msg_add_steal_string(struct ldb_message *msg,
|
||||
const char *attr_name, char *str);
|
||||
int ldb_msg_add_string_flags(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str,
|
||||
int flags);
|
||||
int ldb_msg_add_string(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str);
|
||||
int ldb_msg_add_linearized_dn(struct ldb_message *msg, const char *attr_name,
|
||||
struct ldb_dn *dn);
|
||||
int ldb_msg_add_fmt(struct ldb_message *msg,
|
||||
const char *attr_name, const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
|
||||
/**
|
||||
append a element to a ldb_message
|
||||
*/
|
||||
int ldb_msg_append_value(struct ldb_message *msg,
|
||||
const char *attr_name,
|
||||
const struct ldb_val *val,
|
||||
int flags);
|
||||
int ldb_msg_append_steal_value(struct ldb_message *msg,
|
||||
const char *attr_name,
|
||||
struct ldb_val *val,
|
||||
int flags);
|
||||
int ldb_msg_append_steal_string(struct ldb_message *msg,
|
||||
const char *attr_name, char *str,
|
||||
int flags);
|
||||
int ldb_msg_append_string(struct ldb_message *msg,
|
||||
const char *attr_name, const char *str,
|
||||
int flags);
|
||||
int ldb_msg_append_linearized_dn(struct ldb_message *msg, const char *attr_name,
|
||||
struct ldb_dn *dn, int flags);
|
||||
int ldb_msg_append_fmt(struct ldb_message *msg, int flags,
|
||||
const char *attr_name, const char *fmt, ...) PRINTF_ATTRIBUTE(4,5);
|
||||
|
||||
/**
|
||||
compare two message elements - return 0 on match
|
||||
|
|
|
@ -96,6 +96,12 @@ struct ldb_module;
|
|||
*/
|
||||
#define LDB_FLAG_INTERNAL_FORCE_UNIQUE_INDEX 0x100
|
||||
|
||||
/*
|
||||
* indicates that this element's values are shared with another element (for
|
||||
* example, in a shallow copy of an ldb_message) and should not be freed
|
||||
*/
|
||||
#define LDB_FLAG_INTERNAL_SHARED_VALUES 0x200
|
||||
|
||||
/* an extended match rule that always fails to match */
|
||||
#define SAMBA_LDAP_MATCH_ALWAYS_FALSE "1.3.6.1.4.1.7165.4.5.1"
|
||||
|
||||
|
|
|
@ -946,10 +946,7 @@ struct ldb_request *map_build_fixup_req(struct map_context *ac,
|
|||
if ( ! dn || ! ldb_dn_validate(msg->dn)) {
|
||||
goto failed;
|
||||
}
|
||||
if (ldb_msg_add_empty(msg, IS_MAPPED, LDB_FLAG_MOD_REPLACE, NULL) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
if (ldb_msg_add_string(msg, IS_MAPPED, dn) != 0) {
|
||||
if (ldb_msg_append_string(msg, IS_MAPPED, dn, LDB_FLAG_MOD_REPLACE) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
|
|
@ -569,12 +569,9 @@ static int map_modify_do_local(struct map_context *ac)
|
|||
/* No local record present, add it instead */
|
||||
/* Add local 'IS_MAPPED' */
|
||||
/* TODO: use GUIDs here instead */
|
||||
if (ldb_msg_add_empty(ac->local_msg, IS_MAPPED,
|
||||
LDB_FLAG_MOD_ADD, NULL) != 0) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
ret = ldb_msg_add_linearized_dn(ac->local_msg, IS_MAPPED,
|
||||
ac->remote_req->op.mod.message->dn);
|
||||
ret = ldb_msg_append_linearized_dn(ac->local_msg, IS_MAPPED,
|
||||
ac->remote_req->op.mod.message->dn,
|
||||
LDB_FLAG_MOD_ADD);
|
||||
if (ret != 0) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
|
|
@ -308,16 +308,10 @@ static int rdn_rename_callback(struct ldb_request *req, struct ldb_reply *ares)
|
|||
}
|
||||
rdn_val = ldb_val_dup(msg, rdn_val_p);
|
||||
|
||||
if (ldb_msg_add_empty(msg, rdn_name, LDB_FLAG_MOD_REPLACE, NULL) != 0) {
|
||||
if (ldb_msg_append_value(msg, rdn_name, &rdn_val, LDB_FLAG_MOD_REPLACE) != 0) {
|
||||
goto error;
|
||||
}
|
||||
if (ldb_msg_add_value(msg, rdn_name, &rdn_val, NULL) != 0) {
|
||||
goto error;
|
||||
}
|
||||
if (ldb_msg_add_empty(msg, "name", LDB_FLAG_MOD_REPLACE, NULL) != 0) {
|
||||
goto error;
|
||||
}
|
||||
if (ldb_msg_add_value(msg, "name", &rdn_val, NULL) != 0) {
|
||||
if (ldb_msg_append_value(msg, "name", &rdn_val, LDB_FLAG_MOD_REPLACE) != 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -466,11 +460,7 @@ static int rdn_name_modify(struct ldb_module *module, struct ldb_request *req)
|
|||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
ret = ldb_msg_add_empty(msg, rdn_name, LDB_FLAG_MOD_ADD, NULL);
|
||||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
ret = ldb_msg_add_value(msg, rdn_name, &rdn_val, NULL);
|
||||
ret = ldb_msg_append_value(msg, rdn_name, &rdn_val, LDB_FLAG_MOD_ADD);
|
||||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
|
@ -479,11 +469,7 @@ static int rdn_name_modify(struct ldb_module *module, struct ldb_request *req)
|
|||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
ret = ldb_msg_add_empty(msg, "name", LDB_FLAG_MOD_ADD, NULL);
|
||||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
ret = ldb_msg_add_value(msg, "name", &rdn_val, NULL);
|
||||
ret = ldb_msg_append_value(msg, "name", &rdn_val, LDB_FLAG_MOD_ADD);
|
||||
if (ret != 0) {
|
||||
return ldb_module_oom(module);
|
||||
}
|
||||
|
@ -545,7 +531,7 @@ static int rdn_name_modify(struct ldb_module *module, struct ldb_request *req)
|
|||
if (e != NULL) {
|
||||
ldb_asprintf_errstring(ldb, "Modify of 'distinguishedName' on %s not permitted, must use 'rename' operation instead",
|
||||
ldb_dn_get_linearized(req->op.mod.message->dn));
|
||||
if (e->flags == LDB_FLAG_MOD_REPLACE) {
|
||||
if (LDB_FLAG_MOD_TYPE(e->flags) == LDB_FLAG_MOD_REPLACE) {
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
} else {
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Usage: update.sh VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WAF_VERSION="${1}"
|
||||
WAF_GIT="https://gitlab.com/ita1024/waf.git"
|
||||
WAF_UPDATE_SCRIPT="$(readlink -f "$0")"
|
||||
WAF_SAMBA_DIR="$(dirname "${WAF_UPDATE_SCRIPT}")"
|
||||
WAF_TMPDIR=$(mktemp --tmpdir -d waf-XXXXXXXX)
|
||||
|
||||
echo "VERSION: ${WAF_VERSION}"
|
||||
echo "GIT URL: ${WAF_GIT}"
|
||||
echo "WAF SAMBA DIR: ${WAF_SAMBA_DIR}"
|
||||
echo "WAF TMP DIR: ${WAF_TMPDIR}"
|
||||
|
||||
cleanup_tmpdir() {
|
||||
popd 2>/dev/null || true
|
||||
rm -rf "$WAF_TMPDIR"
|
||||
}
|
||||
trap cleanup_tmpdir SIGINT
|
||||
|
||||
cleanup_and_exit() {
|
||||
cleanup_tmpdir
|
||||
if test "$1" = 0 -o -z "$1" ; then
|
||||
exit 0
|
||||
else
|
||||
exit "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checkout the git tree
|
||||
mkdir -p "${WAF_TMPDIR}"
|
||||
pushd "${WAF_TMPDIR}" || cleanup_and_exit 1
|
||||
|
||||
git clone "${WAF_GIT}"
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "ERROR: Failed to clone repository"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
|
||||
|
||||
pushd waf || cleanup_and_exit 1
|
||||
git checkout -b "waf-${WAF_VERSION}" "waf-${WAF_VERSION}"
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "ERROR: Failed to checkout waf-${WAF_VERSION} repository"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
popd || cleanup_and_exit 1
|
||||
|
||||
popd || cleanup_and_exit 1
|
||||
|
||||
# Update waflib
|
||||
pushd "${WAF_SAMBA_DIR}" || cleanup_and_exit 1
|
||||
pwd
|
||||
|
||||
rm -rf waflib/
|
||||
rsync -av "${WAF_TMPDIR}/waf/waflib" .
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
echo "ERROR: Failed copy waflib"
|
||||
cleanup_and_exit 1
|
||||
fi
|
||||
chmod -x waflib/Context.py
|
||||
|
||||
git add waflib
|
||||
|
||||
popd || cleanup_and_exit 1
|
||||
|
||||
echo
|
||||
echo "Now please change VERSION in buildtools/bin/waf and"
|
||||
echo "Context.HEXVERSION in buildtools/wafsamba/wafsamba.py"
|
||||
grep WAFVERSION "${WAF_SAMBA_DIR}/waflib/Context.py"
|
||||
grep HEXVERSION "${WAF_SAMBA_DIR}/waflib/Context.py"
|
||||
echo
|
||||
|
||||
cleanup_and_exit 0
|
|
@ -1066,9 +1066,9 @@ class inst(Task.Task):
|
|||
else:
|
||||
dest = os.path.normpath(Utils.subst_vars(self.install_to, self.env))
|
||||
if not os.path.isabs(dest):
|
||||
dest = os.path.join(self.env.PREFIX, dest)
|
||||
dest = os.path.join(self.env.PREFIX, dest)
|
||||
if destdir and Options.options.destdir:
|
||||
dest = os.path.join(Options.options.destdir, os.path.splitdrive(dest)[1].lstrip(os.sep))
|
||||
dest = Options.options.destdir.rstrip(os.sep) + os.sep + os.path.splitdrive(dest)[1].lstrip(os.sep)
|
||||
return dest
|
||||
|
||||
def copy_fun(self, src, tgt):
|
||||
|
|
|
@ -18,13 +18,13 @@ else:
|
|||
import imp
|
||||
|
||||
# the following 3 constants are updated on each new release (do not touch)
|
||||
HEXVERSION=0x2001500
|
||||
HEXVERSION=0x2001800
|
||||
"""Constant updated on new releases"""
|
||||
|
||||
WAFVERSION="2.0.21"
|
||||
WAFVERSION="2.0.24"
|
||||
"""Constant updated on new releases"""
|
||||
|
||||
WAFREVISION="edde20a6425a5c3eb6b47d5f3f5c4fbc93fed5f4"
|
||||
WAFREVISION="1af97c71f5a6756abf36d0f78ed8fd551596d7cb"
|
||||
"""Git revision when the waf version is updated"""
|
||||
|
||||
WAFNAME="waf"
|
||||
|
@ -144,7 +144,7 @@ class Context(ctx):
|
|||
:type fun: string
|
||||
|
||||
.. inheritance-diagram:: waflib.Context.Context waflib.Build.BuildContext waflib.Build.InstallContext waflib.Build.UninstallContext waflib.Build.StepContext waflib.Build.ListContext waflib.Configure.ConfigurationContext waflib.Scripting.Dist waflib.Scripting.DistCheck waflib.Build.CleanContext
|
||||
|
||||
:top-classes: waflib.Context.Context
|
||||
"""
|
||||
|
||||
errors = Errors
|
||||
|
|
|
@ -71,7 +71,7 @@ class Consumer(Utils.threading.Thread):
|
|||
"""Task to execute"""
|
||||
self.spawner = spawner
|
||||
"""Coordinator object"""
|
||||
self.setDaemon(1)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
def run(self):
|
||||
"""
|
||||
|
@ -98,7 +98,7 @@ class Spawner(Utils.threading.Thread):
|
|||
""":py:class:`waflib.Runner.Parallel` producer instance"""
|
||||
self.sem = Utils.threading.Semaphore(master.numjobs)
|
||||
"""Bounded semaphore that prevents spawning more than *n* concurrent consumers"""
|
||||
self.setDaemon(1)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
def run(self):
|
||||
"""
|
||||
|
|
|
@ -631,12 +631,8 @@ def process_rule(self):
|
|||
cls.scan = self.scan
|
||||
elif has_deps:
|
||||
def scan(self):
|
||||
nodes = []
|
||||
for x in self.generator.to_list(getattr(self.generator, 'deps', None)):
|
||||
node = self.generator.path.find_resource(x)
|
||||
if not node:
|
||||
self.generator.bld.fatal('Could not find %r (was it declared?)' % x)
|
||||
nodes.append(node)
|
||||
deps = getattr(self.generator, 'deps', None)
|
||||
nodes = self.generator.to_nodes(deps)
|
||||
return [nodes, []]
|
||||
cls.scan = scan
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ MACRO_TO_DEST_CPU = {
|
|||
'__sh__' : 'sh',
|
||||
'__xtensa__' : 'xtensa',
|
||||
'__e2k__' : 'e2k',
|
||||
'__riscv' : 'riscv',
|
||||
}
|
||||
|
||||
@conf
|
||||
|
|
|
@ -128,6 +128,7 @@ class link_task(Task.Task):
|
|||
Base class for all link tasks. A task generator is supposed to have at most one link task bound in the attribute *link_task*. See :py:func:`waflib.Tools.ccroot.apply_link`.
|
||||
|
||||
.. inheritance-diagram:: waflib.Tools.ccroot.stlink_task waflib.Tools.c.cprogram waflib.Tools.c.cshlib waflib.Tools.cxx.cxxstlib waflib.Tools.cxx.cxxprogram waflib.Tools.cxx.cxxshlib waflib.Tools.d.dprogram waflib.Tools.d.dshlib waflib.Tools.d.dstlib waflib.Tools.ccroot.fake_shlib waflib.Tools.ccroot.fake_stlib waflib.Tools.asm.asmprogram waflib.Tools.asm.asmshlib waflib.Tools.asm.asmstlib
|
||||
:top-classes: waflib.Tools.ccroot.link_task
|
||||
"""
|
||||
color = 'YELLOW'
|
||||
|
||||
|
|
|
@ -36,18 +36,19 @@ from waflib import Utils
|
|||
from waflib.Logs import debug
|
||||
|
||||
c_compiler = {
|
||||
'win32': ['msvc', 'gcc', 'clang'],
|
||||
'cygwin': ['gcc', 'clang'],
|
||||
'darwin': ['clang', 'gcc'],
|
||||
'aix': ['xlc', 'gcc', 'clang'],
|
||||
'linux': ['gcc', 'clang', 'icc'],
|
||||
'sunos': ['suncc', 'gcc'],
|
||||
'irix': ['gcc', 'irixcc'],
|
||||
'hpux': ['gcc'],
|
||||
'osf1V': ['gcc'],
|
||||
'gnu': ['gcc', 'clang'],
|
||||
'java': ['gcc', 'msvc', 'clang', 'icc'],
|
||||
'default':['clang', 'gcc'],
|
||||
'win32': ['msvc', 'gcc', 'clang'],
|
||||
'cygwin': ['gcc', 'clang'],
|
||||
'darwin': ['clang', 'gcc'],
|
||||
'aix': ['xlc', 'gcc', 'clang'],
|
||||
'linux': ['gcc', 'clang', 'icc'],
|
||||
'sunos': ['suncc', 'gcc'],
|
||||
'irix': ['gcc', 'irixcc'],
|
||||
'hpux': ['gcc'],
|
||||
'osf1V': ['gcc'],
|
||||
'gnu': ['gcc', 'clang'],
|
||||
'java': ['gcc', 'msvc', 'clang', 'icc'],
|
||||
'gnukfreebsd': ['gcc', 'clang'],
|
||||
'default': ['clang', 'gcc'],
|
||||
}
|
||||
"""
|
||||
Dict mapping platform names to Waf tools finding specific C compilers::
|
||||
|
|
|
@ -37,18 +37,19 @@ from waflib import Utils
|
|||
from waflib.Logs import debug
|
||||
|
||||
cxx_compiler = {
|
||||
'win32': ['msvc', 'g++', 'clang++'],
|
||||
'cygwin': ['g++', 'clang++'],
|
||||
'darwin': ['clang++', 'g++'],
|
||||
'aix': ['xlc++', 'g++', 'clang++'],
|
||||
'linux': ['g++', 'clang++', 'icpc'],
|
||||
'sunos': ['sunc++', 'g++'],
|
||||
'irix': ['g++'],
|
||||
'hpux': ['g++'],
|
||||
'osf1V': ['g++'],
|
||||
'gnu': ['g++', 'clang++'],
|
||||
'java': ['g++', 'msvc', 'clang++', 'icpc'],
|
||||
'default': ['clang++', 'g++']
|
||||
'win32': ['msvc', 'g++', 'clang++'],
|
||||
'cygwin': ['g++', 'clang++'],
|
||||
'darwin': ['clang++', 'g++'],
|
||||
'aix': ['xlc++', 'g++', 'clang++'],
|
||||
'linux': ['g++', 'clang++', 'icpc'],
|
||||
'sunos': ['sunc++', 'g++'],
|
||||
'irix': ['g++'],
|
||||
'hpux': ['g++'],
|
||||
'osf1V': ['g++'],
|
||||
'gnu': ['g++', 'clang++'],
|
||||
'java': ['g++', 'msvc', 'clang++', 'icpc'],
|
||||
'gnukfreebsd': ['g++', 'clang++'],
|
||||
'default': ['clang++', 'g++']
|
||||
}
|
||||
"""
|
||||
Dict mapping the platform names to Waf tools finding specific C++ compilers::
|
||||
|
|
|
@ -109,6 +109,21 @@ def options(opt):
|
|||
opt.add_option('--msvc_targets', type='string', help = 'msvc targets, eg: "x64,arm"', default='')
|
||||
opt.add_option('--no-msvc-lazy', action='store_false', help = 'lazily check msvc target environments', default=True, dest='msvc_lazy')
|
||||
|
||||
class MSVCVersion(object):
|
||||
def __init__(self, ver):
|
||||
m = re.search('^(.*)\s+(\d+[.]\d+)', ver)
|
||||
if m:
|
||||
self.name = m.group(1)
|
||||
self.number = float(m.group(2))
|
||||
else:
|
||||
self.name = ver
|
||||
self.number = 0.
|
||||
|
||||
def __lt__(self, other):
|
||||
if self.number == other.number:
|
||||
return self.name < other.name
|
||||
return self.number < other.number
|
||||
|
||||
@conf
|
||||
def setup_msvc(conf, versiondict):
|
||||
"""
|
||||
|
@ -125,7 +140,7 @@ def setup_msvc(conf, versiondict):
|
|||
platforms=Utils.to_list(conf.env.MSVC_TARGETS) or [i for i,j in all_msvc_platforms+all_icl_platforms+all_wince_platforms]
|
||||
desired_versions = getattr(Options.options, 'msvc_version', '').split(',')
|
||||
if desired_versions == ['']:
|
||||
desired_versions = conf.env.MSVC_VERSIONS or list(reversed(sorted(versiondict.keys())))
|
||||
desired_versions = conf.env.MSVC_VERSIONS or list(sorted(versiondict.keys(), key=MSVCVersion, reverse=True))
|
||||
|
||||
# Override lazy detection by evaluating after the fact.
|
||||
lazy_detect = getattr(Options.options, 'msvc_lazy', True)
|
||||
|
@ -193,7 +208,7 @@ echo PATH=%%PATH%%
|
|||
echo INCLUDE=%%INCLUDE%%
|
||||
echo LIB=%%LIB%%;%%LIBPATH%%
|
||||
""" % (vcvars,target))
|
||||
sout = conf.cmd_and_log(['cmd.exe', '/E:on', '/V:on', '/C', batfile.abspath()])
|
||||
sout = conf.cmd_and_log(['cmd.exe', '/E:on', '/V:on', '/C', batfile.abspath()], stdin=getattr(Utils.subprocess, 'DEVNULL', None))
|
||||
lines = sout.splitlines()
|
||||
|
||||
if not lines[0]:
|
||||
|
|
|
@ -315,7 +315,7 @@ def check_python_headers(conf, features='pyembed pyext'):
|
|||
conf.fatal('Could not find the python executable')
|
||||
|
||||
# so we actually do all this for compatibility reasons and for obtaining pyext_PATTERN below
|
||||
v = 'prefix SO LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS LDVERSION'.split()
|
||||
v = 'prefix SO EXT_SUFFIX LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS LDVERSION'.split()
|
||||
try:
|
||||
lst = conf.get_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
||||
except RuntimeError:
|
||||
|
@ -327,8 +327,8 @@ def check_python_headers(conf, features='pyembed pyext'):
|
|||
dct = dict(zip(v, lst))
|
||||
x = 'MACOSX_DEPLOYMENT_TARGET'
|
||||
if dct[x]:
|
||||
env[x] = conf.environ[x] = dct[x]
|
||||
env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake
|
||||
env[x] = conf.environ[x] = str(dct[x])
|
||||
env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
|
||||
|
||||
|
||||
# Try to get pythonX.Y-config
|
||||
|
@ -416,9 +416,14 @@ def check_python_headers(conf, features='pyembed pyext'):
|
|||
|
||||
if not result:
|
||||
path = [os.path.join(dct['prefix'], "libs")]
|
||||
conf.to_log("\n\n# try again with -L$prefix/libs, and pythonXY name rather than pythonX.Y (win32)\n")
|
||||
conf.to_log("\n\n# try again with -L$prefix/libs, and pythonXY rather than pythonX.Y (win32)\n")
|
||||
result = conf.check(lib=name, uselib='PYEMBED', libpath=path, mandatory=False, msg='Checking for library %s in $prefix/libs' % name)
|
||||
|
||||
if not result:
|
||||
path = [os.path.normpath(os.path.join(dct['INCLUDEPY'], '..', 'libs'))]
|
||||
conf.to_log("\n\n# try again with -L$INCLUDEPY/../libs, and pythonXY rather than pythonX.Y (win32)\n")
|
||||
result = conf.check(lib=name, uselib='PYEMBED', libpath=path, mandatory=False, msg='Checking for library %s in $INCLUDEPY/../libs' % name)
|
||||
|
||||
if result:
|
||||
break # do not forget to set LIBPATH_PYEMBED
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ def find_qt5_binaries(self):
|
|||
# at the end, try to find qmake in the paths given
|
||||
# keep the one with the highest version
|
||||
cand = None
|
||||
prev_ver = ['5', '0', '0']
|
||||
prev_ver = ['0', '0', '0']
|
||||
for qmk in ('qmake-qt5', 'qmake5', 'qmake'):
|
||||
try:
|
||||
qmake = self.find_program(qmk, path_list=paths)
|
||||
|
@ -580,7 +580,7 @@ def find_qt5_binaries(self):
|
|||
else:
|
||||
if version:
|
||||
new_ver = version.split('.')
|
||||
if new_ver > prev_ver:
|
||||
if new_ver[0] == '5' and new_ver > prev_ver:
|
||||
cand = qmake
|
||||
prev_ver = new_ver
|
||||
|
||||
|
@ -783,8 +783,8 @@ def set_qt5_libs_to_check(self):
|
|||
pat = self.env.cxxstlib_PATTERN
|
||||
if Utils.unversioned_sys_platform() == 'darwin':
|
||||
pat = r"%s\.framework"
|
||||
re_qt = re.compile(pat%'Qt5?(?P<name>.*)'+'$')
|
||||
for x in dirlst:
|
||||
re_qt = re.compile(pat % 'Qt5?(?P<name>\\w+)' + '$')
|
||||
for x in sorted(dirlst):
|
||||
m = re_qt.match(x)
|
||||
if m:
|
||||
self.qt5_vars.append("Qt5%s" % m.group('name'))
|
||||
|
|
|
@ -90,6 +90,7 @@ class tex(Task.Task):
|
|||
Compiles a tex/latex file.
|
||||
|
||||
.. inheritance-diagram:: waflib.Tools.tex.latex waflib.Tools.tex.xelatex waflib.Tools.tex.pdflatex
|
||||
:top-classes: waflib.Tools.tex.tex
|
||||
"""
|
||||
|
||||
bibtex_fun, _ = Task.compile_fun('${BIBTEX} ${BIBTEXFLAGS} ${SRCFILE}', shell=False)
|
||||
|
|
|
@ -206,7 +206,7 @@ class utest(Task.Task):
|
|||
self.ut_exec = getattr(self.generator, 'ut_exec', [self.inputs[0].abspath()])
|
||||
ut_cmd = getattr(self.generator, 'ut_cmd', False)
|
||||
if ut_cmd:
|
||||
self.ut_exec = shlex.split(ut_cmd % ' '.join(self.ut_exec))
|
||||
self.ut_exec = shlex.split(ut_cmd % Utils.shell_escape(self.ut_exec))
|
||||
|
||||
return self.exec_command(self.ut_exec)
|
||||
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
|
||||
"Process *.rc* files for C/C++: X{.rc -> [.res|.rc.o]}"
|
||||
|
||||
import os
|
||||
import re
|
||||
from waflib import Task
|
||||
from waflib.TaskGen import extension
|
||||
from waflib.Tools import c_preproc
|
||||
from waflib import Utils
|
||||
|
||||
@extension('.rc')
|
||||
def rc_file(self, node):
|
||||
|
@ -61,6 +63,39 @@ class winrc(Task.Task):
|
|||
tmp.start(self.inputs[0], self.env)
|
||||
return (tmp.nodes, tmp.names)
|
||||
|
||||
def exec_command(self, cmd, **kw):
|
||||
if self.env.WINRC_TGT_F == '/fo':
|
||||
# Since winres include paths may contain spaces, they do not fit in
|
||||
# response files and are best passed as environment variables
|
||||
replace_cmd = []
|
||||
incpaths = []
|
||||
while cmd:
|
||||
# filter include path flags
|
||||
flag = cmd.pop(0)
|
||||
if flag.upper().startswith('/I'):
|
||||
if len(flag) == 2:
|
||||
incpaths.append(cmd.pop(0))
|
||||
else:
|
||||
incpaths.append(flag[2:])
|
||||
else:
|
||||
replace_cmd.append(flag)
|
||||
cmd = replace_cmd
|
||||
if incpaths:
|
||||
# append to existing environment variables in INCLUDE
|
||||
env = kw['env'] = dict(kw.get('env') or self.env.env or os.environ)
|
||||
pre_includes = env.get('INCLUDE', '')
|
||||
env['INCLUDE'] = pre_includes + os.pathsep + os.pathsep.join(incpaths)
|
||||
|
||||
return super(winrc, self).exec_command(cmd, **kw)
|
||||
|
||||
def quote_flag(self, flag):
|
||||
if self.env.WINRC_TGT_F == '/fo':
|
||||
# winres does not support quotes around flags in response files
|
||||
return flag
|
||||
|
||||
return super(winrc, self).quote_flag(flag)
|
||||
|
||||
|
||||
def configure(conf):
|
||||
"""
|
||||
Detects the programs RC or windres, depending on the C/C++ compiler in use
|
||||
|
|
|
@ -11,7 +11,7 @@ through Python versions 2.5 to 3.X and across different platforms (win32, linux,
|
|||
|
||||
from __future__ import with_statement
|
||||
|
||||
import atexit, os, sys, errno, inspect, re, datetime, platform, base64, signal, functools, time
|
||||
import atexit, os, sys, errno, inspect, re, datetime, platform, base64, signal, functools, time, shlex
|
||||
|
||||
try:
|
||||
import cPickle
|
||||
|
@ -577,10 +577,13 @@ def quote_define_name(s):
|
|||
fu = fu.upper()
|
||||
return fu
|
||||
|
||||
re_sh = re.compile('\\s|\'|"')
|
||||
"""
|
||||
Regexp used for shell_escape below
|
||||
"""
|
||||
# shlex.quote didn't exist until python 3.3. Prior to that it was a non-documented
|
||||
# function in pipes.
|
||||
try:
|
||||
shell_quote = shlex.quote
|
||||
except AttributeError:
|
||||
import pipes
|
||||
shell_quote = pipes.quote
|
||||
|
||||
def shell_escape(cmd):
|
||||
"""
|
||||
|
@ -589,7 +592,7 @@ def shell_escape(cmd):
|
|||
"""
|
||||
if isinstance(cmd, str):
|
||||
return cmd
|
||||
return ' '.join(repr(x) if re_sh.search(x) else x for x in cmd)
|
||||
return ' '.join(shell_quote(x) for x in cmd)
|
||||
|
||||
def h_list(lst):
|
||||
"""
|
||||
|
|
|
@ -29,22 +29,9 @@ from waflib import Logs, TaskGen, Task, Build, Scripting
|
|||
|
||||
Task.Task.keep_last_cmd = True
|
||||
|
||||
@TaskGen.feature('c', 'cxx')
|
||||
@TaskGen.after_method('process_use')
|
||||
def collect_compilation_db_tasks(self):
|
||||
"Add a compilation database entry for compiled tasks"
|
||||
if not isinstance(self.bld, ClangDbContext):
|
||||
return
|
||||
|
||||
tup = tuple(y for y in [Task.classes.get(x) for x in ('c', 'cxx')] if y)
|
||||
for task in getattr(self, 'compiled_tasks', []):
|
||||
if isinstance(task, tup):
|
||||
self.bld.clang_compilation_database_tasks.append(task)
|
||||
|
||||
class ClangDbContext(Build.BuildContext):
|
||||
'''generates compile_commands.json by request'''
|
||||
cmd = 'clangdb'
|
||||
clang_compilation_database_tasks = []
|
||||
|
||||
def write_compilation_database(self):
|
||||
"""
|
||||
|
@ -78,6 +65,8 @@ class ClangDbContext(Build.BuildContext):
|
|||
Build dry run
|
||||
"""
|
||||
self.restore()
|
||||
self.cur_tasks = []
|
||||
self.clang_compilation_database_tasks = []
|
||||
|
||||
if not self.all_envs:
|
||||
self.load_envs()
|
||||
|
@ -103,8 +92,21 @@ class ClangDbContext(Build.BuildContext):
|
|||
lst = [tg]
|
||||
else: lst = tg.tasks
|
||||
for tsk in lst:
|
||||
if tsk.__class__.__name__ == "swig":
|
||||
tsk.runnable_status()
|
||||
if hasattr(tsk, 'more_tasks'):
|
||||
lst.extend(tsk.more_tasks)
|
||||
# Not all dynamic tasks can be processed, in some cases
|
||||
# one may have to call the method "run()" like this:
|
||||
#elif tsk.__class__.__name__ == 'src2c':
|
||||
# tsk.run()
|
||||
# if hasattr(tsk, 'more_tasks'):
|
||||
# lst.extend(tsk.more_tasks)
|
||||
|
||||
tup = tuple(y for y in [Task.classes.get(x) for x in ('c', 'cxx')] if y)
|
||||
if isinstance(tsk, tup):
|
||||
self.clang_compilation_database_tasks.append(tsk)
|
||||
tsk.nocache = True
|
||||
old_exec = tsk.exec_command
|
||||
tsk.exec_command = exec_command
|
||||
tsk.run()
|
||||
|
@ -124,7 +126,7 @@ def patch_execute():
|
|||
Invoke clangdb command before build
|
||||
"""
|
||||
if self.cmd.startswith('build'):
|
||||
Scripting.run_command('clangdb')
|
||||
Scripting.run_command(self.cmd.replace('build','clangdb'))
|
||||
|
||||
old_execute_build(self)
|
||||
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
# Thomas Nagy, 2021 (ita)
|
||||
|
||||
from waflib import Utils, Runner
|
||||
|
||||
"""
|
||||
Re-enable the classic threading system from waf 1.x
|
||||
|
||||
def configure(conf):
|
||||
conf.load('classic_runner')
|
||||
"""
|
||||
|
||||
class TaskConsumer(Utils.threading.Thread):
|
||||
"""
|
||||
Task consumers belong to a pool of workers
|
||||
|
||||
They wait for tasks in the queue and then use ``task.process(...)``
|
||||
"""
|
||||
def __init__(self, spawner):
|
||||
Utils.threading.Thread.__init__(self)
|
||||
"""
|
||||
Obtain :py:class:`waflib.Task.TaskBase` instances from this queue.
|
||||
"""
|
||||
self.spawner = spawner
|
||||
self.daemon = True
|
||||
self.start()
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Loop over the tasks to execute
|
||||
"""
|
||||
try:
|
||||
self.loop()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def loop(self):
|
||||
"""
|
||||
Obtain tasks from :py:attr:`waflib.Runner.TaskConsumer.ready` and call
|
||||
:py:meth:`waflib.Task.TaskBase.process`. If the object is a function, execute it.
|
||||
"""
|
||||
master = self.spawner.master
|
||||
while 1:
|
||||
if not master.stop:
|
||||
try:
|
||||
tsk = master.ready.get()
|
||||
if tsk:
|
||||
tsk.log_display(tsk.generator.bld)
|
||||
master.process_task(tsk)
|
||||
else:
|
||||
break
|
||||
finally:
|
||||
master.out.put(tsk)
|
||||
|
||||
class Spawner(object):
|
||||
"""
|
||||
Daemon thread that consumes tasks from :py:class:`waflib.Runner.Parallel` producer and
|
||||
spawns a consuming thread :py:class:`waflib.Runner.Consumer` for each
|
||||
:py:class:`waflib.Task.Task` instance.
|
||||
"""
|
||||
def __init__(self, master):
|
||||
self.master = master
|
||||
""":py:class:`waflib.Runner.Parallel` producer instance"""
|
||||
|
||||
self.pool = [TaskConsumer(self) for i in range(master.numjobs)]
|
||||
|
||||
Runner.Spawner = Spawner
|
|
@ -19,7 +19,7 @@ class ColorGCCFormatter(Logs.formatter):
|
|||
func = frame.f_code.co_name
|
||||
if func == 'exec_command':
|
||||
cmd = frame.f_locals.get('cmd')
|
||||
if isinstance(cmd, list) and ('gcc' in cmd[0] or 'g++' in cmd[0]):
|
||||
if isinstance(cmd, list) and (len(cmd) > 0) and ('gcc' in cmd[0] or 'g++' in cmd[0]):
|
||||
lines = []
|
||||
for line in rec.msg.splitlines():
|
||||
if 'warning: ' in line:
|
||||
|
|
|
@ -10,6 +10,9 @@ Usage:
|
|||
def options(opt):
|
||||
opt.load('eclipse')
|
||||
|
||||
To add additional targets beside standard ones (configure, dist, install, check)
|
||||
the environment ECLIPSE_EXTRA_TARGETS can be set (ie. to ['test', 'lint', 'docs'])
|
||||
|
||||
$ waf configure eclipse
|
||||
"""
|
||||
|
||||
|
@ -25,6 +28,8 @@ cdt_core = oe_cdt + '.core'
|
|||
cdt_bld = oe_cdt + '.build.core'
|
||||
extbuilder_dir = '.externalToolBuilders'
|
||||
extbuilder_name = 'Waf_Builder.launch'
|
||||
settings_dir = '.settings'
|
||||
settings_name = 'language.settings.xml'
|
||||
|
||||
class eclipse(Build.BuildContext):
|
||||
cmd = 'eclipse'
|
||||
|
@ -131,9 +136,11 @@ class eclipse(Build.BuildContext):
|
|||
path = p.path_from(self.srcnode)
|
||||
|
||||
if (path.startswith("/")):
|
||||
cpppath.append(path)
|
||||
if path not in cpppath:
|
||||
cpppath.append(path)
|
||||
else:
|
||||
workspace_includes.append(path)
|
||||
if path not in workspace_includes:
|
||||
workspace_includes.append(path)
|
||||
|
||||
if is_cc and path not in source_dirs:
|
||||
source_dirs.append(path)
|
||||
|
@ -156,6 +163,61 @@ class eclipse(Build.BuildContext):
|
|||
project = self.impl_create_javaproject(javasrcpath, javalibpath)
|
||||
self.write_conf_to_xml('.classpath', project)
|
||||
|
||||
# Create editor language settings to have correct standards applied in IDE, as per project configuration
|
||||
try:
|
||||
os.mkdir(settings_dir)
|
||||
except OSError:
|
||||
pass # Ignore if dir already exists
|
||||
|
||||
lang_settings = Document()
|
||||
project = lang_settings.createElement('project')
|
||||
|
||||
# Language configurations for C and C++ via cdt
|
||||
if hasc:
|
||||
configuration = self.add(lang_settings, project, 'configuration',
|
||||
{'id' : 'org.eclipse.cdt.core.default.config.1', 'name': 'Default'})
|
||||
|
||||
extension = self.add(lang_settings, configuration, 'extension', {'point': 'org.eclipse.cdt.core.LanguageSettingsProvider'})
|
||||
|
||||
provider = self.add(lang_settings, extension, 'provider',
|
||||
{ 'copy-of': 'extension',
|
||||
'id': 'org.eclipse.cdt.ui.UserLanguageSettingsProvider'})
|
||||
|
||||
provider = self.add(lang_settings, extension, 'provider-reference',
|
||||
{ 'id': 'org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider',
|
||||
'ref': 'shared-provider'})
|
||||
|
||||
provider = self.add(lang_settings, extension, 'provider-reference',
|
||||
{ 'id': 'org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider',
|
||||
'ref': 'shared-provider'})
|
||||
|
||||
# C and C++ are kept as separated providers so appropriate flags are used also in mixed projects
|
||||
if self.env.CC:
|
||||
provider = self.add(lang_settings, extension, 'provider',
|
||||
{ 'class': 'org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector',
|
||||
'console': 'false',
|
||||
'id': 'org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector.1',
|
||||
'keep-relative-paths' : 'false',
|
||||
'name': 'CDT GCC Built-in Compiler Settings',
|
||||
'parameter': '%s %s ${FLAGS} -E -P -v -dD "${INPUTS}"'%(self.env.CC[0],' '.join(self.env['CFLAGS'])),
|
||||
'prefer-non-shared': 'true' })
|
||||
|
||||
self.add(lang_settings, provider, 'language-scope', { 'id': 'org.eclipse.cdt.core.gcc'})
|
||||
|
||||
if self.env.CXX:
|
||||
provider = self.add(lang_settings, extension, 'provider',
|
||||
{ 'class': 'org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector',
|
||||
'console': 'false',
|
||||
'id': 'org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector.2',
|
||||
'keep-relative-paths' : 'false',
|
||||
'name': 'CDT GCC Built-in Compiler Settings',
|
||||
'parameter': '%s %s ${FLAGS} -E -P -v -dD "${INPUTS}"'%(self.env.CXX[0],' '.join(self.env['CXXFLAGS'])),
|
||||
'prefer-non-shared': 'true' })
|
||||
self.add(lang_settings, provider, 'language-scope', { 'id': 'org.eclipse.cdt.core.g++'})
|
||||
|
||||
lang_settings.appendChild(project)
|
||||
self.write_conf_to_xml('%s%s%s'%(settings_dir, os.path.sep, settings_name), lang_settings)
|
||||
|
||||
def impl_create_project(self, executable, appname, hasc, hasjava, haspython, waf_executable):
|
||||
doc = Document()
|
||||
projectDescription = doc.createElement('projectDescription')
|
||||
|
@ -341,6 +403,8 @@ class eclipse(Build.BuildContext):
|
|||
addTargetWrap('dist', False)
|
||||
addTargetWrap('install', False)
|
||||
addTargetWrap('check', False)
|
||||
for addTgt in self.env.ECLIPSE_EXTRA_TARGETS or []:
|
||||
addTargetWrap(addTgt, False)
|
||||
|
||||
storageModule = self.add(doc, cproject, 'storageModule',
|
||||
{'moduleId': 'cdtBuildSystem',
|
||||
|
@ -348,6 +412,12 @@ class eclipse(Build.BuildContext):
|
|||
|
||||
self.add(doc, storageModule, 'project', {'id': '%s.null.1'%appname, 'name': appname})
|
||||
|
||||
storageModule = self.add(doc, cproject, 'storageModule',
|
||||
{'moduleId': 'org.eclipse.cdt.core.LanguageSettingsProviders'})
|
||||
|
||||
storageModule = self.add(doc, cproject, 'storageModule',
|
||||
{'moduleId': 'scannerConfiguration'})
|
||||
|
||||
doc.appendChild(cproject)
|
||||
return doc
|
||||
|
||||
|
|
|
@ -29,13 +29,6 @@ if not c_preproc.go_absolute:
|
|||
# Third-party tools are allowed to add extra names in here with append()
|
||||
supported_compilers = ['gas', 'gcc', 'icc', 'clang']
|
||||
|
||||
def scan(self):
|
||||
if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
|
||||
return super(self.derived_gccdeps, self).scan()
|
||||
nodes = self.generator.bld.node_deps.get(self.uid(), [])
|
||||
names = []
|
||||
return (nodes, names)
|
||||
|
||||
re_o = re.compile(r"\.o$")
|
||||
re_splitter = re.compile(r'(?<!\\)\s+') # split by space, except when spaces are escaped
|
||||
|
||||
|
@ -61,28 +54,30 @@ def path_to_node(base_node, path, cached_nodes):
|
|||
else:
|
||||
# Not hashable, assume it is a list and join into a string
|
||||
node_lookup_key = (base_node, os.path.sep.join(path))
|
||||
|
||||
try:
|
||||
lock.acquire()
|
||||
node = cached_nodes[node_lookup_key]
|
||||
except KeyError:
|
||||
node = base_node.find_resource(path)
|
||||
cached_nodes[node_lookup_key] = node
|
||||
finally:
|
||||
lock.release()
|
||||
# retry with lock on cache miss
|
||||
with lock:
|
||||
try:
|
||||
node = cached_nodes[node_lookup_key]
|
||||
except KeyError:
|
||||
node = cached_nodes[node_lookup_key] = base_node.find_resource(path)
|
||||
|
||||
return node
|
||||
|
||||
def post_run(self):
|
||||
if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
|
||||
return super(self.derived_gccdeps, self).post_run()
|
||||
|
||||
name = self.outputs[0].abspath()
|
||||
name = re_o.sub('.d', name)
|
||||
deps_filename = self.outputs[0].abspath()
|
||||
deps_filename = re_o.sub('.d', deps_filename)
|
||||
try:
|
||||
txt = Utils.readf(name)
|
||||
deps_txt = Utils.readf(deps_filename)
|
||||
except EnvironmentError:
|
||||
Logs.error('Could not find a .d dependency file, are cflags/cxxflags overwritten?')
|
||||
raise
|
||||
#os.remove(name)
|
||||
|
||||
# Compilers have the choice to either output the file's dependencies
|
||||
# as one large Makefile rule:
|
||||
|
@ -102,15 +97,16 @@ def post_run(self):
|
|||
# So the first step is to sanitize the input by stripping out the left-
|
||||
# hand side of all these lines. After that, whatever remains are the
|
||||
# implicit dependencies of task.outputs[0]
|
||||
txt = '\n'.join([remove_makefile_rule_lhs(line) for line in txt.splitlines()])
|
||||
deps_txt = '\n'.join([remove_makefile_rule_lhs(line) for line in deps_txt.splitlines()])
|
||||
|
||||
# Now join all the lines together
|
||||
txt = txt.replace('\\\n', '')
|
||||
deps_txt = deps_txt.replace('\\\n', '')
|
||||
|
||||
val = txt.strip()
|
||||
val = [x.replace('\\ ', ' ') for x in re_splitter.split(val) if x]
|
||||
dep_paths = deps_txt.strip()
|
||||
dep_paths = [x.replace('\\ ', ' ') for x in re_splitter.split(dep_paths) if x]
|
||||
|
||||
nodes = []
|
||||
resolved_nodes = []
|
||||
unresolved_names = []
|
||||
bld = self.generator.bld
|
||||
|
||||
# Dynamically bind to the cache
|
||||
|
@ -119,39 +115,41 @@ def post_run(self):
|
|||
except AttributeError:
|
||||
cached_nodes = bld.cached_nodes = {}
|
||||
|
||||
for x in val:
|
||||
for path in dep_paths:
|
||||
|
||||
node = None
|
||||
if os.path.isabs(x):
|
||||
node = path_to_node(bld.root, x, cached_nodes)
|
||||
if os.path.isabs(path):
|
||||
node = path_to_node(bld.root, path, cached_nodes)
|
||||
else:
|
||||
# TODO waf 1.9 - single cwd value
|
||||
path = getattr(bld, 'cwdx', bld.bldnode)
|
||||
base_node = getattr(bld, 'cwdx', bld.bldnode)
|
||||
# when calling find_resource, make sure the path does not contain '..'
|
||||
x = [k for k in Utils.split_path(x) if k and k != '.']
|
||||
while '..' in x:
|
||||
idx = x.index('..')
|
||||
path = [k for k in Utils.split_path(path) if k and k != '.']
|
||||
while '..' in path:
|
||||
idx = path.index('..')
|
||||
if idx == 0:
|
||||
x = x[1:]
|
||||
path = path.parent
|
||||
path = path[1:]
|
||||
base_node = base_node.parent
|
||||
else:
|
||||
del x[idx]
|
||||
del x[idx-1]
|
||||
del path[idx]
|
||||
del path[idx-1]
|
||||
|
||||
node = path_to_node(path, x, cached_nodes)
|
||||
node = path_to_node(base_node, path, cached_nodes)
|
||||
|
||||
if not node:
|
||||
raise ValueError('could not find %r for %r' % (x, self))
|
||||
raise ValueError('could not find %r for %r' % (path, self))
|
||||
|
||||
if id(node) == id(self.inputs[0]):
|
||||
# ignore the source file, it is already in the dependencies
|
||||
# this way, successful config tests may be retrieved from the cache
|
||||
continue
|
||||
nodes.append(node)
|
||||
|
||||
Logs.debug('deps: gccdeps for %s returned %s', self, nodes)
|
||||
resolved_nodes.append(node)
|
||||
|
||||
bld.node_deps[self.uid()] = nodes
|
||||
bld.raw_deps[self.uid()] = []
|
||||
Logs.debug('deps: gccdeps for %s returned %s', self, resolved_nodes)
|
||||
|
||||
bld.node_deps[self.uid()] = resolved_nodes
|
||||
bld.raw_deps[self.uid()] = unresolved_names
|
||||
|
||||
try:
|
||||
del self.cache_sig
|
||||
|
@ -160,6 +158,14 @@ def post_run(self):
|
|||
|
||||
Task.Task.post_run(self)
|
||||
|
||||
def scan(self):
|
||||
if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
|
||||
return super(self.derived_gccdeps, self).scan()
|
||||
|
||||
resolved_nodes = self.generator.bld.node_deps.get(self.uid(), [])
|
||||
unresolved_names = []
|
||||
return (resolved_nodes, unresolved_names)
|
||||
|
||||
def sig_implicit_deps(self):
|
||||
if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
|
||||
return super(self.derived_gccdeps, self).sig_implicit_deps()
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
import os, re
|
||||
from waflib import Utils, Task, Errors
|
||||
from waflib.TaskGen import extension, taskgen_method, feature
|
||||
from waflib.Configure import conf
|
||||
|
||||
@conf
|
||||
def libname_haxe(self, libname):
|
||||
return libname
|
||||
|
||||
@conf
|
||||
def check_lib_haxe(self, libname, uselib_store=None):
|
||||
haxe_libs = [node.name for node in self.root.find_node('haxe_libraries').ant_glob()]
|
||||
changed = False
|
||||
self.start_msg('Checking for library %s' % libname)
|
||||
if libname + '.hxml' in haxe_libs:
|
||||
self.end_msg('yes')
|
||||
else:
|
||||
changed = True
|
||||
try:
|
||||
cmd = self.env.LIX + ['+lib', libname]
|
||||
res = self.cmd_and_log(cmd)
|
||||
if (res):
|
||||
raise Errors.WafError(res)
|
||||
else:
|
||||
self.end_msg('downloaded', color = 'YELLOW')
|
||||
except Errors.WafError as e:
|
||||
self.end_msg('no', color = 'RED')
|
||||
self.fatal('Getting %s has failed' % libname)
|
||||
|
||||
postfix = uselib_store if uselib_store else libname.upper()
|
||||
self.env['LIB_' + postfix] += [self.libname_haxe(libname)]
|
||||
return changed
|
||||
|
||||
@conf
|
||||
def check_libs_haxe(self, libnames, uselib_store=None):
|
||||
changed = False
|
||||
for libname in Utils.to_list(libnames):
|
||||
if self.check_lib_haxe(libname, uselib_store):
|
||||
changed = True
|
||||
return changed
|
||||
|
||||
@conf
|
||||
def ensure_lix_pkg(self, *k, **kw):
|
||||
if kw.get('compiler') == 'hx':
|
||||
if isinstance(kw.get('libs'), list) and len(kw.get('libs')):
|
||||
changed = self.check_libs_haxe(kw.get('libs'), kw.get('uselib_store'))
|
||||
if changed:
|
||||
try:
|
||||
cmd = self.env.LIX + ['download']
|
||||
res = self.cmd_and_log(cmd)
|
||||
if (res):
|
||||
raise Errors.WafError(res)
|
||||
except Errors.WafError as e:
|
||||
self.fatal('lix download has failed')
|
||||
else:
|
||||
self.check_lib_haxe(kw.get('lib'), kw.get('uselib_store'))
|
||||
|
||||
@conf
|
||||
def haxe(bld, *k, **kw):
|
||||
task_gen = bld(*k, **kw)
|
||||
|
||||
class haxe(Task.Task):
|
||||
vars = ['HAXE', 'HAXE_VERSION', 'HAXEFLAGS']
|
||||
ext_out = ['.hl', '.c', '.h']
|
||||
|
||||
def run(self):
|
||||
cmd = self.env.HAXE + self.env.HAXEFLAGS
|
||||
return self.exec_command(cmd, stdout = open(os.devnull, 'w'))
|
||||
|
||||
@taskgen_method
|
||||
def init_haxe_task(self, node):
|
||||
def addflags(flags):
|
||||
self.env.append_value('HAXEFLAGS', flags)
|
||||
|
||||
if node.suffix() == '.hxml':
|
||||
addflags(self.path.abspath() + '/' + node.name)
|
||||
else:
|
||||
addflags(['-main', node.name])
|
||||
addflags(['-hl', self.path.get_bld().make_node(self.target).abspath()])
|
||||
addflags(['-cp', self.path.abspath()])
|
||||
addflags(['-D', 'resourcesPath=%s' % getattr(self, 'res', '')])
|
||||
if hasattr(self, 'use'):
|
||||
for dep in self.use:
|
||||
if self.env['LIB_' + dep]:
|
||||
for lib in self.env['LIB_' + dep]: addflags(['-lib', lib])
|
||||
|
||||
@extension('.hx', '.hxml')
|
||||
def haxe_file(self, node):
|
||||
if len(self.source) > 1:
|
||||
self.bld.fatal('Use separate task generators for multiple files')
|
||||
|
||||
try:
|
||||
haxetask = self.haxetask
|
||||
except AttributeError:
|
||||
haxetask = self.haxetask = self.create_task('haxe')
|
||||
self.init_haxe_task(node)
|
||||
|
||||
haxetask.inputs.append(node)
|
||||
haxetask.outputs.append(self.path.get_bld().make_node(self.target))
|
||||
|
||||
@conf
|
||||
def find_haxe(self, min_version):
|
||||
npx = self.env.NPX = self.find_program('npx')
|
||||
self.env.LIX = npx + ['lix']
|
||||
npx_haxe = self.env.HAXE = npx + ['haxe']
|
||||
try:
|
||||
output = self.cmd_and_log(npx_haxe + ['-version'])
|
||||
except Errors.WafError:
|
||||
haxe_version = None
|
||||
else:
|
||||
ver = re.search(r'\d+.\d+.\d+', output).group().split('.')
|
||||
haxe_version = tuple([int(x) for x in ver])
|
||||
|
||||
self.msg('Checking for haxe version',
|
||||
haxe_version, haxe_version and haxe_version >= min_version)
|
||||
if npx_haxe and haxe_version < min_version:
|
||||
self.fatal('haxe version %r is too old, need >= %r' % (haxe_version, min_version))
|
||||
|
||||
self.env.HAXE_VERSION = haxe_version
|
||||
return npx_haxe
|
||||
|
||||
@conf
|
||||
def check_haxe(self, min_version=(4,1,4)):
|
||||
if self.env.HAXE_MINVER:
|
||||
min_version = self.env.HAXE_MINVER
|
||||
find_haxe(self, min_version)
|
||||
|
||||
def configure(self):
|
||||
self.env.HAXEFLAGS = []
|
||||
self.check_haxe()
|
||||
self.add_os_flags('HAXEFLAGS', dup = False)
|
|
@ -32,7 +32,6 @@ from waflib.Tools import c_preproc, c, cxx, msvc
|
|||
from waflib.TaskGen import feature, before_method
|
||||
|
||||
lock = threading.Lock()
|
||||
nodes = {} # Cache the path -> Node lookup
|
||||
|
||||
PREPROCESSOR_FLAG = '/showIncludes'
|
||||
INCLUDE_PATTERN = 'Note: including file:'
|
||||
|
@ -50,23 +49,47 @@ def apply_msvcdeps_flags(taskgen):
|
|||
if taskgen.env.get_flat(flag).find(PREPROCESSOR_FLAG) < 0:
|
||||
taskgen.env.append_value(flag, PREPROCESSOR_FLAG)
|
||||
|
||||
|
||||
def get_correct_path_case(base_path, path):
|
||||
'''
|
||||
Return a case-corrected version of ``path`` by searching the filesystem for
|
||||
``path``, relative to ``base_path``, using the case returned by the filesystem.
|
||||
'''
|
||||
components = Utils.split_path(path)
|
||||
|
||||
corrected_path = ''
|
||||
if os.path.isabs(path):
|
||||
corrected_path = components.pop(0).upper() + os.sep
|
||||
|
||||
for part in components:
|
||||
part = part.lower()
|
||||
search_path = os.path.join(base_path, corrected_path)
|
||||
if part == '..':
|
||||
corrected_path = os.path.join(corrected_path, part)
|
||||
search_path = os.path.normpath(search_path)
|
||||
continue
|
||||
|
||||
for item in sorted(os.listdir(search_path)):
|
||||
if item.lower() == part:
|
||||
corrected_path = os.path.join(corrected_path, item)
|
||||
break
|
||||
else:
|
||||
raise ValueError("Can't find %r in %r" % (part, search_path))
|
||||
|
||||
return corrected_path
|
||||
|
||||
|
||||
def path_to_node(base_node, path, cached_nodes):
|
||||
'''
|
||||
Take the base node and the path and return a node
|
||||
Results are cached because searching the node tree is expensive
|
||||
The following code is executed by threads, it is not safe, so a lock is needed...
|
||||
'''
|
||||
# normalize the path because ant_glob() does not understand
|
||||
# parent path components (..)
|
||||
# normalize the path to remove parent path components (..)
|
||||
path = os.path.normpath(path)
|
||||
|
||||
# normalize the path case to increase likelihood of a cache hit
|
||||
path = os.path.normcase(path)
|
||||
|
||||
# ant_glob interprets [] and () characters, so those must be replaced
|
||||
path = path.replace('[', '?').replace(']', '?').replace('(', '[(]').replace(')', '[)]')
|
||||
|
||||
node_lookup_key = (base_node, path)
|
||||
node_lookup_key = (base_node, os.path.normcase(path))
|
||||
|
||||
try:
|
||||
node = cached_nodes[node_lookup_key]
|
||||
|
@ -76,8 +99,8 @@ def path_to_node(base_node, path, cached_nodes):
|
|||
try:
|
||||
node = cached_nodes[node_lookup_key]
|
||||
except KeyError:
|
||||
node_list = base_node.ant_glob([path], ignorecase=True, remove=False, quiet=True, regex=False)
|
||||
node = cached_nodes[node_lookup_key] = node_list[0] if node_list else None
|
||||
path = get_correct_path_case(base_node.abspath(), path)
|
||||
node = cached_nodes[node_lookup_key] = base_node.find_node(path)
|
||||
|
||||
return node
|
||||
|
||||
|
@ -89,9 +112,9 @@ def post_run(self):
|
|||
if getattr(self, 'cached', None):
|
||||
return Task.Task.post_run(self)
|
||||
|
||||
bld = self.generator.bld
|
||||
unresolved_names = []
|
||||
resolved_nodes = []
|
||||
unresolved_names = []
|
||||
bld = self.generator.bld
|
||||
|
||||
# Dynamically bind to the cache
|
||||
try:
|
||||
|
@ -124,11 +147,14 @@ def post_run(self):
|
|||
continue
|
||||
|
||||
if id(node) == id(self.inputs[0]):
|
||||
# Self-dependency
|
||||
# ignore the source file, it is already in the dependencies
|
||||
# this way, successful config tests may be retrieved from the cache
|
||||
continue
|
||||
|
||||
resolved_nodes.append(node)
|
||||
|
||||
Logs.debug('deps: msvcdeps for %s returned %s', self, resolved_nodes)
|
||||
|
||||
bld.node_deps[self.uid()] = resolved_nodes
|
||||
bld.raw_deps[self.uid()] = unresolved_names
|
||||
|
||||
|
|
|
@ -787,8 +787,12 @@ class msvs_generator(BuildContext):
|
|||
self.collect_dirs()
|
||||
default_project = getattr(self, 'default_project', None)
|
||||
def sortfun(x):
|
||||
if x.name == default_project:
|
||||
# folders should sort to the top
|
||||
if getattr(x, 'VS_GUID_SOLUTIONFOLDER', None):
|
||||
return ''
|
||||
# followed by the default project
|
||||
elif x.name == default_project:
|
||||
return ' '
|
||||
return getattr(x, 'path', None) and x.path.win32path() or x.name
|
||||
self.all_projects.sort(key=sortfun)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ tasks have to be added dynamically:
|
|||
|
||||
SWIG_EXTS = ['.swig', '.i']
|
||||
|
||||
re_module = re.compile(r'%module(?:\s*\(.*\))?\s+(.+)', re.M)
|
||||
re_module = re.compile(r'%module(?:\s*\(.*\))?\s+([^\r\n]+)', re.M)
|
||||
|
||||
re_1 = re.compile(r'^%module.*?\s+([\w]+)\s*?$', re.M)
|
||||
re_2 = re.compile(r'[#%](?:include|import(?:\(module=".*"\))+|python(?:begin|code)) [<"](.*)[">]', re.M)
|
||||
|
|
|
@ -31,6 +31,7 @@ The following environment variables may be set:
|
|||
gsutil cp gs://mybucket/bb/bbbbb/2 build/somefile
|
||||
* WAFCACHE_NO_PUSH: if set, disables pushing to the cache
|
||||
* WAFCACHE_VERBOSITY: if set, displays more detailed cache operations
|
||||
* WAFCACHE_STATS: if set, displays cache usage statistics on exit
|
||||
|
||||
File cache specific options:
|
||||
Files are copied using hard links by default; if the cache is located
|
||||
|
@ -69,6 +70,7 @@ EVICT_INTERVAL_MINUTES = int(os.environ.get('WAFCACHE_EVICT_INTERVAL_MINUTES', 3
|
|||
EVICT_MAX_BYTES = int(os.environ.get('WAFCACHE_EVICT_MAX_BYTES', 10**10))
|
||||
WAFCACHE_NO_PUSH = 1 if os.environ.get('WAFCACHE_NO_PUSH') else 0
|
||||
WAFCACHE_VERBOSITY = 1 if os.environ.get('WAFCACHE_VERBOSITY') else 0
|
||||
WAFCACHE_STATS = 1 if os.environ.get('WAFCACHE_STATS') else 0
|
||||
OK = "ok"
|
||||
|
||||
re_waf_cmd = re.compile('(?P<src>%{SRC})|(?P<tgt>%{TGT})')
|
||||
|
@ -93,6 +95,9 @@ def can_retrieve_cache(self):
|
|||
sig = self.signature()
|
||||
ssig = Utils.to_hex(self.uid() + sig)
|
||||
|
||||
if WAFCACHE_STATS:
|
||||
self.generator.bld.cache_reqs += 1
|
||||
|
||||
files_to = [node.abspath() for node in self.outputs]
|
||||
err = cache_command(ssig, [], files_to)
|
||||
if err.startswith(OK):
|
||||
|
@ -100,6 +105,8 @@ def can_retrieve_cache(self):
|
|||
Logs.pprint('CYAN', ' Fetched %r from cache' % files_to)
|
||||
else:
|
||||
Logs.debug('wafcache: fetched %r from cache', files_to)
|
||||
if WAFCACHE_STATS:
|
||||
self.generator.bld.cache_hits += 1
|
||||
else:
|
||||
if WAFCACHE_VERBOSITY:
|
||||
Logs.pprint('YELLOW', ' No cache entry %s' % files_to)
|
||||
|
@ -117,11 +124,17 @@ def put_files_cache(self):
|
|||
if WAFCACHE_NO_PUSH or getattr(self, 'cached', None) or not self.outputs:
|
||||
return
|
||||
|
||||
files_from = []
|
||||
for node in self.outputs:
|
||||
path = node.abspath()
|
||||
if not os.path.isfile(path):
|
||||
return
|
||||
files_from.append(path)
|
||||
|
||||
bld = self.generator.bld
|
||||
sig = self.signature()
|
||||
ssig = Utils.to_hex(self.uid() + sig)
|
||||
|
||||
files_from = [node.abspath() for node in self.outputs]
|
||||
err = cache_command(ssig, files_from, [])
|
||||
|
||||
if err.startswith(OK):
|
||||
|
@ -129,6 +142,8 @@ def put_files_cache(self):
|
|||
Logs.pprint('CYAN', ' Successfully uploaded %s to cache' % files_from)
|
||||
else:
|
||||
Logs.debug('wafcache: Successfully uploaded %r to cache', files_from)
|
||||
if WAFCACHE_STATS:
|
||||
self.generator.bld.cache_puts += 1
|
||||
else:
|
||||
if WAFCACHE_VERBOSITY:
|
||||
Logs.pprint('RED', ' Error caching step results %s: %s' % (files_from, err))
|
||||
|
@ -193,6 +208,10 @@ def make_cached(cls):
|
|||
if getattr(cls, 'nocache', None) or getattr(cls, 'has_cache', False):
|
||||
return
|
||||
|
||||
full_name = "%s.%s" % (cls.__module__, cls.__name__)
|
||||
if full_name in ('waflib.Tools.ccroot.vnum', 'waflib.Build.inst'):
|
||||
return
|
||||
|
||||
m1 = getattr(cls, 'run', None)
|
||||
def run(self):
|
||||
if getattr(self, 'nocache', False):
|
||||
|
@ -208,9 +227,6 @@ def make_cached(cls):
|
|||
return m2(self)
|
||||
ret = m2(self)
|
||||
self.put_files_cache()
|
||||
if hasattr(self, 'chmod'):
|
||||
for node in self.outputs:
|
||||
os.chmod(node.abspath(), self.chmod)
|
||||
return ret
|
||||
cls.post_run = post_run
|
||||
cls.has_cache = True
|
||||
|
@ -242,6 +258,19 @@ def build(bld):
|
|||
"""
|
||||
Called during the build process to enable file caching
|
||||
"""
|
||||
if WAFCACHE_STATS:
|
||||
# Init counter for statistics and hook to print results at the end
|
||||
bld.cache_reqs = bld.cache_hits = bld.cache_puts = 0
|
||||
|
||||
def printstats(bld):
|
||||
hit_ratio = 0
|
||||
if bld.cache_reqs > 0:
|
||||
hit_ratio = (bld.cache_hits / bld.cache_reqs) * 100
|
||||
Logs.pprint('CYAN', ' wafcache stats: requests: %s, hits, %s, ratio: %.2f%%, writes %s' %
|
||||
(bld.cache_reqs, bld.cache_hits, hit_ratio, bld.cache_puts) )
|
||||
|
||||
bld.add_post_fun(printstats)
|
||||
|
||||
if process_pool:
|
||||
# already called once
|
||||
return
|
||||
|
@ -320,7 +349,10 @@ def lru_trim():
|
|||
|
||||
size = 0
|
||||
for fname in os.listdir(path):
|
||||
size += os.lstat(os.path.join(path, fname)).st_size
|
||||
try:
|
||||
size += os.lstat(os.path.join(path, fname)).st_size
|
||||
except OSError:
|
||||
pass
|
||||
lst.append((os.stat(path).st_mtime, size, path))
|
||||
|
||||
lst.sort(key=lambda x: x[0])
|
||||
|
@ -331,7 +363,7 @@ def lru_trim():
|
|||
_, tmp_size, path = lst.pop()
|
||||
tot -= tmp_size
|
||||
|
||||
tmp = path + '.tmp'
|
||||
tmp = path + '.remove'
|
||||
try:
|
||||
shutil.rmtree(tmp)
|
||||
except OSError:
|
||||
|
@ -339,12 +371,12 @@ def lru_trim():
|
|||
try:
|
||||
os.rename(path, tmp)
|
||||
except OSError:
|
||||
sys.stderr.write('Could not rename %r to %r' % (path, tmp))
|
||||
sys.stderr.write('Could not rename %r to %r\n' % (path, tmp))
|
||||
else:
|
||||
try:
|
||||
shutil.rmtree(tmp)
|
||||
except OSError:
|
||||
sys.stderr.write('Could not remove %r' % tmp)
|
||||
sys.stderr.write('Could not remove %r\n' % tmp)
|
||||
sys.stderr.write("Cache trimmed: %r bytes in %r folders left\n" % (tot, len(lst)))
|
||||
|
||||
|
||||
|
@ -371,8 +403,8 @@ def lru_evict():
|
|||
try:
|
||||
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
except EnvironmentError:
|
||||
sys.stderr.write('another process is running!\n')
|
||||
pass
|
||||
if WAFCACHE_VERBOSITY:
|
||||
sys.stderr.write('wafcache: another cleaning process is running\n')
|
||||
else:
|
||||
# now dow the actual cleanup
|
||||
lru_trim()
|
||||
|
@ -443,7 +475,10 @@ class fcache(object):
|
|||
else:
|
||||
# attempt trimming if caching was successful:
|
||||
# we may have things to trim!
|
||||
lru_evict()
|
||||
try:
|
||||
lru_evict()
|
||||
except Exception:
|
||||
return traceback.format_exc()
|
||||
return OK
|
||||
|
||||
def copy_from_cache(self, sig, files_from, files_to):
|
||||
|
@ -481,7 +516,7 @@ class bucket_cache(object):
|
|||
out, err = proc.communicate()
|
||||
if proc.returncode:
|
||||
raise OSError('Error copy %r to %r using: %r (exit %r):\n out:%s\n err:%s' % (
|
||||
source, target, cmd, proc.returncode, out.decode(), err.decode()))
|
||||
source, target, cmd, proc.returncode, out.decode(errors='replace'), err.decode(errors='replace')))
|
||||
|
||||
def copy_to_cache(self, sig, files_from, files_to):
|
||||
try:
|
||||
|
|
|
@ -56,7 +56,7 @@ def r1(code):
|
|||
@subst('Runner.py')
|
||||
def r4(code):
|
||||
"generator syntax"
|
||||
return code.replace('next(self.biter)', 'self.biter.next()')
|
||||
return code.replace('next(self.biter)', 'self.biter.next()').replace('self.daemon = True', 'self.setDaemon(1)')
|
||||
|
||||
@subst('Context.py')
|
||||
def r5(code):
|
||||
|
|
Loading…
Reference in New Issue